[m-rev.] diff: fix static linking problems with gcc 4.7 on Linux
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Nov 30 14:29:52 AEDT 2012
Branches: main, 12.08
Fix a problem statically linking Mercury executables with gcc 4.7
on Linux.
configure.in:
Add a comma after GCC's -Wl option. GCC 4.7 (on Fedora 17)
no longer recognises the variant without the comma.
(XXX I'm not sure that the whole -Wl,-defsym -Wl,_DYNAMIC=0
thing is actually necessary these days -- things seem fine
on my machine without it, but I haven't tested this on
other machines.)
Julien.
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.618
diff -u -r1.618 configure.in
--- configure.in 6 Nov 2012 07:22:43 -0000 1.618
+++ configure.in 30 Nov 2012 03:15:51 -0000
@@ -4590,10 +4590,10 @@
# similar treatment for other OSs too.)
case "$C_COMPILER_TYPE" in
gcc*)
- LD_STATIC_FLAGS="-static -Wl-defsym -Wl_DYNAMIC=0"
+ LD_STATIC_FLAGS="-static -Wl,-defsym -Wl,_DYNAMIC=0"
;;
clang*)
- LD_STATIC_FLAGS="-static -Wl-defsym -Wl_DYNAMIC=0"
+ LD_STATIC_FLAGS="-static -Wl,-defsym -Wl,_DYNAMIC=0"
;;
lcc)
# for lcc 4.1, we need to use "-Wl,".
More information about the reviews
mailing list