Modify

#1227 closed enhancement (fixed)

Cross-compilation Improvements

Reported by: Guillermo Amaral <g@…> Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.4
Keywords: Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:

Description

I noticed the cross-compilation support in the Bitlbee configure script is a bit strict.

I've modified it to make it easier to integrate into Buildroot.

The modification are still backward compatible with how it worked before.

Attachments (0)

Change History (6)

comment:1 Changed at 2015-08-31T03:05:29Z by Guillermo Amaral <g@…>

I can't seem to attach files. I'm getting: OSError: [Errno 13] Permission denied: '/home/wilmer/trac/bitlbee/files/attachments/ticket/29f'

I've pastebinned the patch instead: http://pastebin.com/6gYStSAV

comment:2 Changed at 2015-08-31T03:16:36Z by Guillermo Amaral <g@…>

Changes allow users to specify a sysroot which is used to prepend system libs. It could also be used to specify --sysroot via CFLAGS but I decided no to add it just yet. It may cause compilations to break in some older compilers.

STRIP is now also prepended with the TARGET, same as CC and LD.

We prevent PKG_CONFIG_LIBDIR from being overwritten, it's only set if it's not found. This could be the only thing that might break the previous cross-compilation setups, if they have PKG_CONFIG_LIBDIR in the environment, it will NOT be overwritten.

comment:3 Changed at 2015-08-31T06:13:38Z by dx

Thanks for the patch! Looks mostly good. One issue though, systemlibdirs_cross+="$sysroot$i " seems to be a bashism, I'm getting errors when running it under dash (which is the default /bin/sh of debian systems)

$ dash ./configure --target='asd'
BitlBee configure
./configure: 248: ./configure: systemlibdirs_cross+=/lib64 : not found
./configure: 248: ./configure: systemlibdirs_cross+=/usr/lib64 : not found
./configure: 248: ./configure: systemlibdirs_cross+=/usr/local/lib64 : not found
./configure: 248: ./configure: systemlibdirs_cross+=/lib : not found
./configure: 248: ./configure: systemlibdirs_cross+=/usr/lib : not found
./configure: 248: ./configure: systemlibdirs_cross+=/usr/local/lib : not found

comment:4 Changed at 2015-08-31T07:01:54Z by Guillermo Amaral <g@…>

You're right. /me shakes first at BASH.

Here's another version (dash tested): http://pastebin.com/YYErCUHL

comment:5 Changed at 2015-08-31T14:03:57Z by dx

Resolution: fixed
Status: newclosed

comment:6 Changed at 2015-08-31T16:32:44Z by wilmer

FWIW I've also restored permissions so that attachments will hopefully work again.

Though for patches likely a pull request is better anyway yes.

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.