Subject: Re: 'C compiler cannot create executables' on Darwin
To: grant beattie <grant@NetBSD.org>
From: David Hopper <DHOP@gesi.net>
List: tech-pkg
Date: 12/22/2003 16:18:21
> From: grant beattie <grant@NetBSD.org>
> 
> I tried setting _OPSYS_RPATH_NAME=-R and the rpath arguments were
> stripped from the cc command-line. you should be able to just change
> this single line in defs.Darwin.mk to test it.
> 
> this is not ideal, since -R will sometimes be present in LDFLAGS and
> therefore a manual pkg build in the WRKDIR won't work...

Perhaps not ideal, but I can confirm that this allows all builds that were
failing on 7.2.0 before to continue.

>> I might be totally wrong here, but it would be really nice if someone could
>> provide patches for Darwin's setting of "-Wl,-L" for gen-transforms.sh, send
>> it to those two gentlemen and see if this will help them.
> 
> please let me know whether any combination of -L and -Wl,-L arguments
> to cc/ld work so I know how to address this.

From 'man ld':
       -Ldir  Add  dir  to  the  list  of  directories  in which to search
for libraries.  Directories specified with -L  are  searched  before the
standard directories.

From 'man gcc':
-Wl,option
           Pass option as an option to the linker.  If option contains
commas, it is split into multiple options at the commas.

*shrug*

Thanks all,
Dave

> 
> thanks!
> 
> grant.