0
gcc-mp-4.8 test.c
otool -L a.out

shows that the executable is linked with /opt/local/lib/gcc48/libgcc_s.1.dylib, and that's not what I want, because the path won't exist on a stock Mac OS X system.

How can I use MacPorts-installed GCC 4.8 to build MacPorts-independent executables that would use /usr/lib/libgcc_s.1.dylib instead?

I've tried adding -L/usr/lib/ -lgcc_s.1 to arguments, but that doesn't change anything.

Kornel
  • 97,764
  • 37
  • 219
  • 309
  • So you modified a Makefile and it didn't do what you wanted, or you have a build script that doesn't send the correct arguments into the link stage? – Warren P Mar 23 '13 at 13:14

1 Answers1

1

gcc isn't meant to link against the library from older versions.. You should be able to statically link instead, however.

Mahmoud Al-Qudsi
  • 28,357
  • 12
  • 85
  • 125