patch applied (ghc): Tweak the Makefile code for making .a libs; fixes trac #3642

Matthias Kilian kili at outback.escape.de
Sat Mar 27 13:37:24 EDT 2010


On Wed, Mar 24, 2010 at 12:55:23PM -0700, Ian Lynagh wrote:
> Tue Mar 23 15:13:25 PDT 2010  Ian Lynagh <igloo at earth.li>
>   * Tweak the Makefile code for making .a libs; fixes trac #3642
>   The main change is that, rather than using "xargs ar" we now put
>   all the filenames into a file, and do "ar @file". This means that
>   ar adds all the files at once, which works around a problem where
>   files with the same basename in a later invocation were overwriting
>   the existing file in the .a archive.
> 
>     M ./rules/build-package-way.mk -6 +7

This breaks older GNU ar(1) (like on OpenBSD) which doesn't understand
the @file notation.

I don't quite understand, why that `s' bug of GNU ar(1) mentioned
in #3642 would be a problem at all, since for GNU ar(1), aclocal.m4
already ensured that ar(1) isn't invoked with the `s' option. The
only way a `-s' can creep into a build using GNU ar(1) seems to be
on MacOS X (at least I guess so, because of
distrib/MacOS/GHC.xcodeproj/project.pbxproj, which is the only file
that contains some definition of EXTRA_AR_ARGS).

Also, does anyone an overview about which platform needs which
options to ar(1)? The current list tried for (non-GNU) versions
(clqsZ clqs cqs clq cq) looks a little bit odd. In theory, running
ar(1) with qc (probably multiple times via xargs(1)) followed by
an invocation of ranlib(1) where necessary should just work[tm].

Ciao,
	Kili



More information about the Cvs-ghc mailing list