[fixed]gcc 4.6 no longer recognizes some linker options

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

[fixed]gcc 4.6 no longer recognizes some linker options

Post by hendu »

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628282

Building irr fails on the latest stable gcc. Debian patch is to remove this line:
staticlib sharedlib: LDFLAGS += --no-export-all-symbols --add-stdcall-alias
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: gcc 4.6 no longer recognizes some linker options

Post by hybrid »

I think the proper fix would be to prefix it with -Wl,
Gonna read some more about these options and fix it int he makefiles. Should work even with older gcc versions, so no problem to change it globally.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: gcc 4.6 no longer recognizes some linker options

Post by hendu »

No, the linker won't accept those options either, I tried that. edit: the --no option seems to have disappeared, and the --enable one is renamed --add, and is only effective on mingw. It errors out on native linux.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: gcc 4.6 no longer recognizes some linker options

Post by hybrid »

Ok, the std-call option is windows anyway. Don't know why it wasn't put there. the export of symbols needs to be checked some further. Would be best to have this properly closed down on all systems. As far as I see, we already have the gcc attributes properly set for gcc4 systems, so you simply need to add -fvisibility=hidden to the CXXFLAGS. Since we don't have a configuration process, though, we cannot make this automatic. So please add this parameter manually while we support gcc3 as well.
Post Reply