From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9482 invoked from network); 10 Nov 2021 06:29:24 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2021 06:29:24 -0000 Received: (qmail 7659 invoked by uid 550); 10 Nov 2021 06:29:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7596 invoked from network); 10 Nov 2021 06:29:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=TsozbFAId6qwaaRFvI+E4WfTuG1petrkozPAEOWWpwU=; b=J/0N9/wVlI+ED7IVPPoZqBHtnp5Duo0YjYymE9SJiTr+1gX0RupYt/9IfH1Aw5O08g 96ZzBgPqRm9BQaY3cBNHoenBiXvRK7FiG7uojCKWJR2Xj97beNZH3GzKkWH0OkEf51X8 T5DHW0LYPtLhsk3FdXYtDF18pdRAQ8/U/AC9yQFcJHX5PCfZx9AhuSuImm++DWGxRpGP SqIag4mEgCuDkTgZARNdhJIs9Yc3Mcz969pHkjTp6Tx4TNRYWoKwJnEnYi5i7rlw/NE0 K81unfgNwSGFdDgtwBGiX/pRWBN97KFtsxP6dPSMAzL6EWvWvCtFcoWOevboC7c4x9Ff vvsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TsozbFAId6qwaaRFvI+E4WfTuG1petrkozPAEOWWpwU=; b=pMLPLQtEJK2qZ4zIgAbJRnOes29dpgfRYKs4aiSg/YZe9JoZcIApkumOzj4kXdt/wp duHIl2QFLEqxHlEY0QG6cBt1dkaiGoRv0iNESodQkWt+oOwJdZdWvLO/Jgt+3yCIsMJQ T1tFcJj3keMfWvVqYrPIJ8CNHx0of0Qu+5iOXtgIZ/natN9dvOFiy3fJ1z7KSAdQmqUo Ynzesbd2G1X/7uPERESBAeySaYcfCDzWRHov+fX17T9ihj6XHvOzvvqrnKVc4ZUbQrtl jto4dx0vwYs9P1O9UMRMvHYOubToYRX2nDDUdNqnAuGJrck8m8vfwsUidFkaVoATuP2u zvfg== X-Gm-Message-State: AOAM533SuZJwPBkLCDKTjfBJSLBjS+XFh6J3t0sM/6nyTc9ZTLjgbsyW dSqW2Awwd//t7pus02J5+2zt5p+kkFGf1Gp5y7HpO7nYqLE= X-Google-Smtp-Source: ABdhPJyla0HXoFEXS0wkdp/DgwewqqACG2cglRwOj9+8FyRnNDRuxCEY198J5VmEtAgkdayO7cdn6DdeK2D0E7FqIbA= X-Received: by 2002:a17:907:6d20:: with SMTP id sa32mr17464140ejc.108.1636525748032; Tue, 09 Nov 2021 22:29:08 -0800 (PST) MIME-Version: 1.0 From: Matt Andrews Date: Wed, 10 Nov 2021 17:28:57 +1100 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000e0976c05d069578b" Subject: [musl] Cross compiling with LLVM/clang --000000000000e0976c05d069578b Content-Type: text/plain; charset="UTF-8" Hi, I've posted about this before, but I've been at this for a month now and I'm fresh out of ideas. I could be making things hard for myself with my approach, but I want to understand what I'm doing wrong. I'm trying to cross compile musl for armv7a-linux-eabihf and a cortex-a8 cpu. Here's what I'm doing cd /usr/src/musl \ && AR=/usr/lib/llvm-13/bin/llvm-ar \ RANLIB=/usr/lib/llvm-13/bin/llvm-ranlib \ CC=/usr/lib/llvm-13/bin/clang \ CFLAGS="-fuse-ld=/usr/lib/llvm-13/bin/ld.lld --rtlib=compiler-rt -mcpu=cortex-a8" \ LIBCC=-lcompiler_rt \ ./configure \ --prefix=$VECX/usr \ --syslibdir=$VECX/lib \ --target=armv7a-linux-eabihf \ && make \ && make install Here's the output/error from ./configure checking for C compiler... /usr/lib/llvm-13/bin/clang checking whether C compiler works... yes checking whether compiler accepts -Werror=unknown-warning-option... yes checking whether compiler accepts -Werror=unused-command-line-argument... yes checking whether compiler accepts -Werror=ignored-optimization-argument... yes checking whether linker accepts -Werror=unknown-warning-option... yes checking whether linker accepts -Werror=unused-command-line-argument... yes checking for C compiler family... clang checking for toolchain wrapper to build... clang checking target system type... armv7a-linux-eabihf checking whether compiler accepts -std=c99... yes checking whether compiler accepts -nostdinc... yes checking whether compiler accepts -ffreestanding... yes checking whether compiler accepts -fexcess-precision=standard... no checking whether compiler accepts -frounding-math... yes checking whether compiler needs attribute((may_alias)) suppression... no checking whether compiler accepts -Wa,--noexecstack... yes checking whether compiler accepts -fno-stack-protector... yes checking whether compiler accepts -fno-tree-loop-distribute-patterns... no checking whether we should preprocess assembly to add debugging information... no checking for optimization settings... using defaults checking whether compiler accepts -Os... yes components to be optimized for speed: internal malloc string checking whether compiler accepts -pipe... yes checking whether compiler accepts -fomit-frame-pointer... yes checking whether compiler accepts -fno-unwind-tables... yes checking whether compiler accepts -fno-asynchronous-unwind-tables... yes checking whether compiler accepts -ffunction-sections... yes checking whether compiler accepts -fdata-sections... yes checking whether compiler accepts -w... yes checking whether compiler accepts -Wno-pointer-to-int-cast... yes checking whether compiler accepts -Werror=implicit-function-declaration... yes checking whether compiler accepts -Werror=implicit-int... yes checking whether compiler accepts -Werror=pointer-sign... yes checking whether compiler accepts -Werror=pointer-arith... yes checking whether compiler accepts -Werror=int-conversion... yes checking whether compiler accepts -Werror=incompatible-pointer-types... yes checking whether compiler accepts -Werror=discarded-qualifiers... no checking whether compiler accepts -Werror=discarded-array-qualifiers... no checking whether compiler accepts -Qunused-arguments... yes checking whether compiler accepts -Waddress... yes checking whether compiler accepts -Warray-bounds... yes checking whether compiler accepts -Wchar-subscripts... yes checking whether compiler accepts -Wduplicate-decl-specifier... yes checking whether compiler accepts -Winit-self... yes checking whether compiler accepts -Wreturn-type... yes checking whether compiler accepts -Wsequence-point... yes checking whether compiler accepts -Wstrict-aliasing... yes checking whether compiler accepts -Wunused-function... yes checking whether compiler accepts -Wunused-label... yes checking whether compiler accepts -Wunused-variable... yes checking preprocessor condition __PIC__... false checking whether linker accepts -Wl,--sort-section,alignment... yes checking whether linker accepts -Wl,--sort-common... yes checking whether linker accepts -Wl,--gc-sections... yes checking whether linker accepts -Wl,--hash-style=both... yes checking whether linker accepts -Wl,--no-undefined... yes checking whether linker accepts -Wl,--exclude-libs=ALL... yes checking whether linker accepts -Wl,--dynamic-list=./dynamic.list... yes using compiler runtime libraries: -lcompiler_rt checking preprocessor condition __thumb2__... false checking preprocessor condition __ARMEB__... false checking preprocessor condition __ARM_PCS_VFP... false checking whether clang's vfp asm constraints work... yes checking whether compiler's long double definition matches float.h... no ./configure: error: unsupported long double type ------ executor failed running [/bin/sh -c cd /usr/src/musl && AR=/usr/lib/llvm-13/bin/llvm-ar RANLIB=/usr/lib/llvm-13/bin/llvm-ranlib CC=/usr/lib/llvm-13/bin/clang CFLAGS="-fuse-ld=/usr/lib/llvm-13/bin/ld.lld --rtlib=compiler-rt -mcpu=cortex-a8" LIBCC=-lcompiler_rt ./configure --prefix=$VECX/usr --syslibdir=$VECX/lib --target=armv7a-linux-eabihf && make && make install]: exit code: 1 I had a look at the configure script to see what causes that error and I think it's building a test program? Is the long double type something that is in compiler-rt? Does compiler-rt also have to be built for armv7a-linux-eabihf as well? --000000000000e0976c05d069578b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I've posted about th= is before, but I've been at this for a month now and I'm fresh out = of ideas.

I could be making things hard for myself= with my approach, but I want to understand what I'm doing wrong.
=

I'm trying to cross compile musl for armv7a-linux-e= abihf and a cortex-a8 cpu.

Here's what I'm= doing

cd /usr/src/musl \
&& AR=3D/usr/lib/llvm-13/bin/llvm-ar \<= /span>
RANLIB=3D/usr/lib/llvm-13/bin/llvm-ranlib \
CC=3D/usr/lib/llvm-13/bin/clang \
CFLAGS=3D"-fuse-ld=3D/usr/lib/llvm-13/bi= n/ld.lld --rtlib=3Dcompiler-rt -mcpu=3Dcortex-a8" \
LIBCC=3D-lcompiler_rt \<= /div>
./configure \
= --pre= fix=3D$VECX/usr \
--syslibdir=3D$V= ECX/lib \
--target=3Darmv7a-linux-= eabihf \
&& make \
&& make install

Here's the output/error f= rom ./configure

checking for C compiler... /usr/lib/llvm-13/bin/clang = =
checking whether C compiler works... yes = = =
checking whether compiler = accepts -Werror=3Dunknown-warning-option... yes = =
= check= ing whether compiler accepts -Werror=3Dunused-command-line-argument... yes<= /span>
checking whether compiler accepts -Werror= =3Dignored-optimization-argument... yes
ch= ecking whether linker accepts -Werror=3Dunknown-warning-option... yes
checking whether linker accepts -Werror=3Dunuse= d-command-line-argument... yes
checking fo= r C compiler family... clang
= checking for = toolchain wrapper to build... clang
<= span style=3D"color:rgb(0,0,0)">checki= ng target system type... armv7a-linux-eabihf
checking whether compiler accepts -std=3Dc99... yes=
checking whether compiler accepts -nostdinc... yes
checking whether compiler accepts -ffreestanding... y= es
<= span style=3D"background-color:rgb(255,255,255)">checking whether compiler accepts -fexc= ess-precision=3Dstandard... no
checking wh= ether compiler accepts -frounding-math... yes
checking whether compiler needs attribute((may_alias)) suppression... n= o
checking whether compiler accepts -Wa,--= noexecstack... yes
checking whether compil= er accepts -fno-stack-protector... yes
che= cking whether compiler accepts -fno-tree-loop-distribute-patterns... no
checking whether we should preprocess assembl= y to add debugging information... no
= check= ing for optimization settings... using defaults=
checking whether compiler accepts -Os... yes
components to be optimized for speed: internal malloc string
checking whether compiler accepts -pipe... yes<= /span>
checking whether compiler accepts -fomit-= frame-pointer... yes
checking whether comp= iler accepts -fno-unwind-tables... yes
che= cking whether compiler accepts -fno-asynchronous-unwind-tables... yes
checking whether compiler accepts -ffunction-se= ctions... yes
checking whether compiler ac= cepts -fdata-sections... yes
= checking whet= her compiler accepts -w... yes
checking wh= ether compiler accepts -Wno-pointer-to-int-cast... yes=
checking whether compiler accepts -Werror=3Dimplicit-function-= declaration... yes
checking whether compil= er accepts -Werror=3Dimplicit-int... yes
<= div>c= hecking whether compiler accepts -Werror=3Dpointer-sign... yes
checking whether compiler accepts -Werror=3Dpointer-ar= ith... yes
<= span style=3D"font-family:arial,sans-serif">checking whether compiler accep= ts -Werror=3Dint-conversion... yes
checkin= g whether compiler accepts -Werror=3Dincompatible-pointer-types... yes
checking whether compiler accepts -Werror=3Ddi= scarded-qualifiers... no
checking whether= compiler accepts -Werror=3Ddiscarded-array-qualifiers... no<= /span>
checking whether compiler accepts -Qunused-arguments... = yes
= checking whether compiler accepts -Wad= dress... yes
checking whether compiler acc= epts -Warray-bounds... yes
checking whethe= r compiler accepts -Wchar-subscripts... yes
checking whether compiler accepts -Wduplicate-decl-specifier... yes
checking whether compiler accepts -Winit-self..= . yes
checking whether compiler accepts -W= return-type... yes
checking whether compil= er accepts -Wsequence-point... yes
checkin= g whether compiler accepts -Wstrict-aliasing... yes
checking whether compiler accepts -Wunused-function... yes=
checking whether compiler accepts -Wunused-label= ... yes
checking whether compiler accepts = -Wunused-variable... yes
checking preproc= essor condition __PIC__... false
checking = whether linker accepts -Wl,--sort-section,alignment... yes
checking whether linker accepts -Wl,--sort-common... yes
checking whether linker accepts -Wl,--gc-= sections... yes
checking whether linker ac= cepts -Wl,--hash-style=3Dboth... yes
= check= ing whether linker accepts -Wl,--no-undefined... yes
checking whether linker accepts -Wl,--exclude-libs=3DALL... yes<= /span>
checking whether linker accepts -Wl,--dyn= amic-list=3D./dynamic.list... yes
using co= mpiler runtime libraries: -lcompiler_rt
ch= ecking preprocessor condition __thumb2__... false
checking preprocessor condition __ARMEB__... false
checking preprocessor condition __ARM_PCS_VFP... false
checking whether clang's vfp asm constrai= nts work... yes
checking whether compiler&= #39;s long double definition matches float.h... no
./configure: error: unsupported long double type
------
executor failed run= ning [/bin/sh -c cd /usr/src/musl && AR=3D/usr/lib/llvm-13/bin/= llvm-ar RANLIB=3D/usr/lib/llvm-13/bin/llvm-ranlib CC=3D/usr= /lib/llvm-13/bin/clang CFLAGS=3D"-fuse-ld=3D/usr/lib/llvm-13/b= in/ld.lld --rtlib=3Dcompiler-rt -mcpu=3Dcortex-a8" LIBCC=3D-lc= ompiler_rt ./configure --prefix=3D$VECX/usr --sysli= bdir=3D$VECX/lib --target=3Darmv7a-linux-eabihf && make= && make install]: exit code: 1

I had a look at the = configure script to see what causes that error and I think it's buildin= g a test program?

Is the long = double type something that is in compiler-rt? Does compiler-rt also have to= be built for armv7a-linux-eabihf as well?
<= /div>
--000000000000e0976c05d069578b--