Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#22445 closed enhancement (fixed)

configure binutils with --enable-shared

Reported by: mwolfram@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: borschel@…
Port: binutils

Description

MacPorts: 1.8.1 binutils: 2.20

Currently binutils will build a libbfd which requires one to link against libiberty.a. When one creates a shared library which uses libbfd this fails because the libiberty.a has a dependency on _environ which is only linked to executables.

configuring binutils with --enable-shared will place libiberty code into libbfd and libopcodes and enables building of other shared libraries using libbfd.

So it would be great to have binutils install the shared version by default.

Change History (3)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Type: requestenhancement

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Increased revision in r60739 so everyone gets the change.

Following r60374, the .la files now have sections like these, when building with the universal variant:

# Libraries that this one depends upon.
#ifndef __LP64__
dependency_libs=' -L/opt/local/lib -L/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_binutils/work/binutils-2.20-i386/opcodes/../libiberty/pic -liberty'
#else /* __LP64__ */
dependency_libs=' -L/opt/local/lib -L/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_binutils/work/binutils-2.20-x86_64/opcodes/../libiberty/pic -liberty'
#endif /* __LP64__ */

I assume these files are therefore now unusable, since I don't think C preprocessor directives are legal in .la files. I've added a comment about this to #21953.

Note: See TracTickets for help on using tickets.