Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 4 Jul 2019 04:38:44 +0000
From: Fangrui Song <i@...kray.me>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH] configure: make AR and RANLIB customizable

On 2019-07-03, Rich Felker wrote:
>On Wed, Jul 03, 2019 at 08:53:12AM +0000, Fangrui Song wrote:
>> New patch attached.
>>
>>
>> With 2 local llvm/clang patches, I am able to build musl powerpc64le with the following command:
>>
>> .../configure --target=powerpc64le AR=~/llvm/Release/bin/llvm-ar RANLIB=true CC=~/llvm/Release/bin/clang CFLAGS='-target powerpc64le-linux -mlong-double-64' LDFLAGS=-fuse-ld=lld --enable-debug
>>
>> # "-linux" in "powerpc64le-linux" is important.
>> # If -target powerpc64le is used instead, clang will invoke gcc instead of itself in the linker stage, which will not work.
>
>> >From 4415adea632ca0fee80e10b6cd73b590417a2266 Mon Sep 17 00:00:00 2001
>> From: Fangrui Song <i@...kray.me>
>> Date: Thu, 27 Jun 2019 08:10:04 +0000
>> Subject: [PATCH] configure: make AR and RANLIB customizable
>>
>> ---
>>  Makefile  | 2 --
>>  configure | 4 ++++
>>  2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index b46f8ca4..6842983b 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -51,8 +51,6 @@ CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS)
>>
>>  LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS)
>>
>> -AR      = $(CROSS_COMPILE)ar
>> -RANLIB  = $(CROSS_COMPILE)ranlib
>>  INSTALL = $(srcdir)/tools/install.sh
>
>I think you can omit the changes to Makefile. They break running make
>with an existing config.mak not updated by new configure, and since
>the assignments are before "include config.mak", the ones from
>config.mak will override if present.
>
>>  ARCH_INCLUDES = $(wildcard $(srcdir)/arch/$(ARCH)/bits/*.h)
>> diff --git a/configure b/configure
>> index 60e0b1fc..86801281 100755
>> --- a/configure
>> +++ b/configure
>> @@ -172,6 +172,8 @@ case "$arg" in
>>  --host=*|--target=*) target=${arg#*=} ;;
>>  --build=*) build=${arg#*=} ;;
>>  -* ) echo "$0: unknown option $arg" ;;
>> +AR=*) AR=${arg#*=} ;;
>> +RANLIB=*) RANLIB=${arg#*=} ;;
>>  CC=*) CC=${arg#*=} ;;
>>  CFLAGS=*) CFLAGS=${arg#*=} ;;
>>  CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
>> @@ -734,6 +736,8 @@ cat << EOF
>>  # This version of config.mak was generated by:
>>  # $cmdline
>>  # Any changes made here will be lost if configure is re-run
>> +AR = ${AR:-\$(CROSS_COMPILE)ar}
>> +RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib}
>>  ARCH = $ARCH
>>  SUBARCH = $SUBARCH
>>  ASMSUBARCH = $ASMSUBARCH
>> --
>> 2.22.0
>>
>
>Looks ok otherwise. Would you like me to apply with the above change?

Sure. Thanks!

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.