google-code-export / gpick

Automatically exported from code.google.com/p/gpick
2 stars 0 forks source link

ld: unknown option: -as-needed #111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. scons && make

What is the expected output? What do you see instead?
Expected successful compile but got:

ld warning: option -s is obsolete and being ignored
ld: unknown option: -as-needed
collect2: ld returned 1 exit status
scons: *** [build/source/gpick] Error 1
scons: building terminated because of errors.

What version of the product are you using? On what operating system?
gpick 0.2.5, Mac OS X 10.5.8, Xcode 3.1.4, gcc version 4.0.1 (Apple Inc. build 
5493)

Please provide any additional information below.
My understanding is that first of all the option is misspelled in your 
SConscript: it's supposed to be "--as-needed" not "-as-needed". However that's 
not understood by the old Mac OS X linker either; I understand this is a GNU ld 
option, and Apple's ld is not GNU ld. If you want to use --as-needed when it's 
supported, that's fine, but you need to detect linkers that don't support it 
and not give the argument to them.

Original issue reported on code.google.com by ryandesi...@gmail.com on 19 Dec 2013 at 5:42

GoogleCodeExporter commented 9 years ago
Darwin platform detection added and a different set of flags is now used. This 
should also fix issue 112. Please test the attached patch and report if it 
fixes the issue, or needs additional improvements.

Original comment by thezbyg on 19 Dec 2013 at 9:02

Attachments: