mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 05:44:58 +00:00
Due to a bug in the Solaris linker, we need to call the GC_INIT()
scripts/mod2init.sh, runtime/{wrapper.mod,init.h}:
Due to a bug in the Solaris linker, we need to call the GC_INIT()
macro from some statically linked part of the code.
So I've modified mod2init to add an init_gc() function to the init
file, and I've modified wrapper.mod to call it.
This commit is contained in:
@@ -48,6 +48,16 @@ for mod in $modules; do
|
|||||||
echo "extern void $mod(void);";
|
echo "extern void $mod(void);";
|
||||||
done
|
done
|
||||||
echo "";
|
echo "";
|
||||||
|
echo "#ifdef CONSERVATIVE_GC";
|
||||||
|
echo "/* This works around a bug in the Solaris 2.X (X <= 4) linker. */";
|
||||||
|
echo "/* The reason it is here is that it needs to be in statically linked */";
|
||||||
|
echo "/* code, it won't work if it is in the dynamically linked library. */";
|
||||||
|
echo "void init_gc(void)";
|
||||||
|
echo "{";
|
||||||
|
echo " GC_INIT();";
|
||||||
|
echo "}";
|
||||||
|
echo "#endif";
|
||||||
|
echo "";
|
||||||
echo "void init_modules(void)";
|
echo "void init_modules(void)";
|
||||||
echo "{";
|
echo "{";
|
||||||
for mod in $modules; do
|
for mod in $modules; do
|
||||||
|
|||||||
Reference in New Issue
Block a user