[ ant-contrib-Bugs-1948308 ] Incorrect flags for static/dynamic linking under OS/X

"SourceForge.net" <[email protected]> Mon, 21 Apr 2008 15:41:06 -0700
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
Bugs item #1948308, was opened at 2008-04-21 15:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1948308&group_id=36177

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: cpptasks
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Constantine (jconstantine)
Assigned to: Curt Arnold (carnold)
Summary: Incorrect flags for static/dynamic linking under OS/X

Initial Comment:
In porting the XBiG project to the Mac, I found that the compiler task was generating the "-Bdynamic" rather than "-dynamic" for the Mac.  My fix is silly, but it works:

net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker
    protected String getDynamicLibFlag() {
        if (isDarwin()) {
            return "-dynamic";
        }
        return "-Bdynamic";
    }

    protected String getStaticLibFlag() {
        if (isDarwin()) {
            return "-static";
        }
        return "-Bstatic";
    }

This, naturally, requires a patch to the test: net.sf.antcontrib.cpptasks.gcc.TestAbstractLdLinker.testAddLibraryStatic to account for this.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=1948308&group_id=36177

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone