Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#53027 closed defect (fixed)

binutils: libiberty installed to $prefix/include, conflicts in ports

Reported by: mojca (Mojca Miklavec) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stuartwesterman (Stuart Westerman), g5pw (Aljaž Srebrnič), jinksys@…, yann.sionneau@…, nwg (Nathaniel W Griswold), jmroot (Joshua Root), landonf (Landon Fuller), pixilla (Bradley Giesbrecht)
Port: arm-aout-binutils arm-elf-binutils arm-none-eabi-binutils arm-none-linux-gnueabi-binutils arm-rtems-binutils avr-binutils i386-elf-binutils i386-mingw32-binutils i386-rtems-binutils i960-rtems-binutils lm32-rtems-binutils m68k-elf-binutils m68k-rtems-binutils mips-elf-binutils mips-rtems-binutils mipsel-linux-binutils msp430-binutils powerpc-rtems-binutils ppc-linux-binutils sh-rtems-binutils sparc-rtems-binutils spu-binutils x86_64-elf-binutils

Description (last modified by mojca (Mojca Miklavec))

I just noticed that when using the crossbinutils PortGroup, one ends up with:

  /opt/local/${target}/host/lib/libiberty.a
  /opt/local/include/libiberty/*.h

The first one is not problematic, but files under $prefix/include are because any given binutils port would install that.

I found a related commit:

Judging from the fact that bfd installs

  /opt/local/${host}/bin/ld.bfd
  /opt/local/${host}/host/include/*.h
  /opt/local/${host}/host/lib/libbfd.a
  /opt/local/${host}/host/lib/libbfd.la

I guess that some recent update of binutils broke the reinplace patch.

This requires:

  • a patch in the portgroup to fix the problem
  • a revbump (or ideally upgrade) of all affected *-binutils ports
  • probably a bit more testing with a couple of different binutils versions

Maybe the older versions are not even affected and a fix would break older ports, I'm not sure.

Existing binutils ports:

Using the portgroup:

avr-binutils @2.27 g5pw
msp430-binutils @2.21.1a-20120406 g5pw
msp430-binutils-devel @2.22 g5pw
arm-elf-binutils @2.25 gmail:stuartwesterman
arm-none-eabi-binutils @2.23.1 gmail:stuartwesterman
i386-elf-binutils @2.23.1 gmail:jinksys
x86_64-elf-binutils @2.23.1 gmail:nategriswold
ppc-linux-binutils @2.25
arm-aout-binutils @2.22
spu-binutils @2.20.51.0.5

Others:

arm-none-linux-gnueabi-binutils @2005q3-2
arm-rtems-binutils @2.18
i386-mingw32-binutils @2.21-3
i386-rtems-binutils @2.18
i960-rtems-binutils @2.16.1
lm32-rtems-binutils @2.21.1
m68k-elf-binutils @2.17
m68k-rtems-binutils @2.18
mips-elf-binutils @2.17
mips-rtems-binutils @2.18
mipsel-linux-binutils @2.16.1
powerpc-rtems-binutils @2.18
sh-rtems-binutils @2.18
sparc-rtems-binutils @2.18

See also #51935.

Attachments (1)

crossbinutils-1.0.tcl.diff (1.2 KB) - added by mojca (Mojca Miklavec) 8 years ago.
An attempt of a patch for libiberty in crossbinutils

Download all attachments as: .zip

Change History (25)

Changed 8 years ago by mojca (Mojca Miklavec)

Attachment: crossbinutils-1.0.tcl.diff added

An attempt of a patch for libiberty in crossbinutils

comment:1 Changed 8 years ago by mojca (Mojca Miklavec)

I attached a patch that seems to fix the issue with headers. The second section (adding /) is optional. Aljaž, are you willing to test?

One problem with the existing reinplace is that one ends up with

"libdir="/opt/local/i686-w64-mingw32/host/lib""

even though I didn't spot any real problem with that. This can be fixed later if needed.

I was hoping that

reinplace "s|@libdir@|\"${prefix}/${crossbinutils.target}/host/lib\"|g" \
    ${worksrcpath}/libiberty/Makefile.in

would work in a cleaner way, but it doesn't seem to. I need to learn more about Makefile syntax.

comment:2 Changed 8 years ago by mojca (Mojca Miklavec)

See also r72086

comment:3 Changed 8 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

I sorted the ports a bit according to:

  • whether they use the portgroup
  • maintainer
  • version

It could be that only the newer versions are affected.

comment:4 Changed 8 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

comment:5 Changed 8 years ago by mojca (Mojca Miklavec)

I opened a pull request for the ports that include the PortGroup. Others are probably not affected anyway.

comment:6 Changed 8 years ago by mojca (Mojca Miklavec)

In 2a2a8ad9/macports-ports:

crossbinutils-1.0: move libiberty header

Fix location of ${prefix}/include/libiberty/*.h
that caused conflicts in *-binutils ports.

See: #53027

comment:7 Changed 8 years ago by mojca (Mojca Miklavec)

In 3ad4b096/macports-ports:

arm-aout-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:8 Changed 8 years ago by mojca (Mojca Miklavec)

In 7e0ebaf0/macports-ports:

avr-binutils: remove libiberty patch, revbump

  • Remove $Id$ line.
  • Patch for libiberty is no longer needed, but we need a revbump.

See: #53027

comment:9 Changed 8 years ago by mojca (Mojca Miklavec)

In 1edf79dc/macports-ports:

spu-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:10 Changed 8 years ago by mojca (Mojca Miklavec)

In 0cd1ac1/macports-ports:

ppc-linux-binutils: upgrade to 2.27

Patches no longer needed (included upstream).

See: #51935
See: #53027

comment:11 Changed 8 years ago by mojca (Mojca Miklavec)

In 0eb3986/macports-ports:

arm-elf-binutils: upgrade to 2.27

License is part of the PortGroup and not needed here.

See: #51935
See: #53027

comment:12 Changed 8 years ago by mojca (Mojca Miklavec)

In ccc83b5/macports-ports:

arm-none-eabi-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:13 Changed 8 years ago by mojca (Mojca Miklavec)

In 9451379b/macports-ports:

x86_64-elf-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:14 Changed 8 years ago by mojca (Mojca Miklavec)

In 9a5ee5f9/macports-ports:

i386-elf-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:15 Changed 8 years ago by mojca (Mojca Miklavec)

Description: modified (diff)
Resolution: fixed
Status: newclosed

I upgraded all ports that use the crosstools portgroup except for msp430-binutils[-devel] and those two apparently use an old enough version of binutils, so that the archives on http://packages.macports.org/ were not affected.

Closing this ticket, still tracking updates on #51935.

comment:16 Changed 8 years ago by mojca (Mojca Miklavec)

In 87373c87/macports-ports:

crossbinutils-1.0: move libiberty header

Fix location of ${prefix}/include/libiberty/*.h
that caused conflicts in *-binutils ports.

See: #53027

comment:17 Changed 8 years ago by mojca (Mojca Miklavec)

In 86b7e10f/macports-ports:

arm-aout-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:18 Changed 8 years ago by mojca (Mojca Miklavec)

In 052712f9/macports-ports:

avr-binutils: remove libiberty patch, revbump

  • Remove $Id$ line.
  • Patch for libiberty is no longer needed, but we need a revbump.

See: #53027

comment:19 Changed 8 years ago by mojca (Mojca Miklavec)

In ac2c4a0f/macports-ports:

spu-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:20 Changed 8 years ago by mojca (Mojca Miklavec)

In 45f441f5/macports-ports:

ppc-linux-binutils: upgrade to 2.27

Patches no longer needed (included upstream).

See: #51935
See: #53027

comment:21 Changed 8 years ago by mojca (Mojca Miklavec)

In 0e51d256/macports-ports:

arm-elf-binutils: upgrade to 2.27

License is part of the PortGroup and not needed here.

See: #51935
See: #53027

comment:22 Changed 8 years ago by mojca (Mojca Miklavec)

In 51b0f70b/macports-ports:

arm-none-eabi-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:23 Changed 8 years ago by mojca (Mojca Miklavec)

In 218cd7b4/macports-ports:

x86_64-elf-binutils: upgrade to 2.27

See: #51935
See: #53027

comment:24 Changed 8 years ago by mojca (Mojca Miklavec)

In 07cded63/macports-ports:

i386-elf-binutils: upgrade to 2.27

See: #51935
See: #53027

Note: See TracTickets for help on using tickets.