Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Apr 2013 00:31:34 -0400
From: Zvi Gilboa <zg7s@...rvices.virginia.edu>
To: <musl@...ts.openwall.com>
Subject: Re: Request for ideas on arch-specific musl-gcc specfile additions

On 04/14/2013 09:31 PM, Rich Felker wrote:
> Right now, musl-gcc has problems on at least a few archs:
>
> - powerpc: it does not setup the right secure-plt options for dynamic
>    linking.
>
> - mips: gcc's internals on mips expect the -EL and -EB options to work
>    for selecting endianness, but they're not real options; they're
>    created by the specfile
>
> - any arch with 32/64-bit variants: if -m32 or -m64 was used building
>    musl, it should get added to the specfile for musl-gcc.
>
> I'm looking for a clean approach to fixing this. Certainly the
> configure script could just generate one or more extra variables that
> get stored in config.mak and substituted into the specfile, but I'd
> rather avoid having essential logic like this in configure, as it
> makes it difficult for anybody who wants to generate config.mak by
> hand. If there are specific options always needed on a given arch, the
> build process (even without configure being used) should automatically
> add them to the specfile.

Two ideas come to mind:

1) similar to alltypes.h(.sh), have an arch-specific script generate the 
specs file, or at least that portion of the specs file that might 
contain arch-specific variants.

2) add arch-specific variables in the relevant places and set them from 
outside, possibly by executing musl-gcc.specs.sh from within an 
arch-specific shell script.  For instance:

*cpp_options:
$ARCH_SPECIFIC_CFLAGS -nostdinc -isystem $incdir %(old_cpp_options)


>
> Any good proposals?
>
> Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.