Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pass args to ld?



You should file a bug with Apple, but a few workarounds:
1) Download cctools from Apple and rebuilt libtool to pass the arguments
correctly
2) Extract the ld invocation and rerun it with -m:
LINKCOMMAND="cc -o libtest.dylib -dynamiclib test.o"
$($LINKCOMMAND -Wl,-v 2>&1 | sed 's/\+ \(.*\)$/\1 -m/')

Shantonu

On Tue, 24 Jun 2003, Andrew Begel wrote:

> I'm trying to use g++ to link a binary and I want to pass -m to ld.
> /usr/bin/libtool is getting in the way.
>
> I want to say
>
> g++ -dynamiclib -Wl,-m -o
> OBJ.powerpc-apple-darwin6.6/libHarmonia_Common.dylib
> OBJ.powerpc-apple-darwin6.6/error.o OBJ.powerpc-apple-darwin6.6/trace.o
> OBJ.powerpc-apple-darwin6.6/debug.o
> OBJ.powerpc-apple-darwin6.6/profile.o
> OBJ.powerpc-apple-darwin6.6/diag.o
> OBJ.powerpc-apple-darwin6.6/backtrace.o
> OBJ.powerpc-apple-darwin6.6/timer.o
> OBJ.powerpc-apple-darwin6.6/PooledString.o
> OBJ.powerpc-apple-darwin6.6/SearchPath.o
> OBJ.powerpc-apple-darwin6.6/Observer.o
> OBJ.powerpc-apple-darwin6.6/Observable.o
> OBJ.powerpc-apple-darwin6.6/float.o
> OBJ.powerpc-apple-darwin6.6/std_hash.o
> OBJ.powerpc-apple-darwin6.6/cygwin.o
> OBJ.powerpc-apple-darwin6.6/std_string.o
> OBJ.powerpc-apple-darwin6.6/fileloader.o
> OBJ.powerpc-apple-darwin6.6/XMLWriter.o
> ../alloc/OBJ.powerpc-apple-darwin6.6/liballoc.a -all_load
> -install_name
> /Library/Frameworks/Harmonia_Common.framework/Versions/A/
> Harmonia_Common -compatibility_version 1.0.0 -current_version 1.0.0
> -headerpad_max_install_names -framework CoreFoundation
> -L/usr/local/lib -L/sw/lib -lgc -lexpat -lz -framework System
>
> But it gets passed to libtool first, and libtool won't pass -m through
> to ld.
>
> /usr/bin/libtool: unknown option character `m' in: -m
> Usage: /usr/bin/libtool -static [-] file [...] [-filelist
> listfile[,dirname]] [-arch_only arch] [-sacLT]
> Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist
> listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name]
> [-compatibility_version #] [-current_version #] [-seg1addr 0x#]
> [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table
> <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load]
> [-noall_load]
>
>
> Is there a passthrough option for libtool?
>
> andy
>
>
> -----------
> Andrew Begel
> Ph.D. Candidate
> Computer Science Division
> University of California, Berkeley
> _______________________________________________
> darwin-development mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Pass args to ld? (From: "Andrew Begel" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.