How to change gcc from clang at build kernel and world?

Mori Hiroki yamori813 at yahoo.co.jp
Sat Jul 9 16:42:15 UTC 2016


Thanks advice.


I try to build on this options at two week before head source. I have as follow error...

--------------------------------------------------------------
>>> stage 4.2: building libraries
--------------------------------------------------------------
cd /storage/home/hiroki/freebsd;  MAKEOBJDIRPREFIX=/storage/home/hiroki/obj//sto
rage/home/hiroki/zrouter/tmp//arm.arm  MACHINE_ARCH=arm  MACHINE=arm  CPUTYPE=ar
mv4 GROFF_BIN_PATH=/storage/home/hiroki/obj//storage/home/hiroki/zrouter/tmp//ar
m.arm/storage/home/hiroki/freebsd/tmp/legacy/usr/bin  GROFF_FONT_PATH=/storage/h
ome/hiroki/obj//storage/home/hiroki/zrouter/tmp//arm.arm/storage/home/hiroki/fre
ebsd/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/storage/home/hiroki/obj//
storage/home/hiroki/zrouter/tmp//arm.arm/storage/home/hiroki/freebsd/tmp/legacy/
usr/share/tmac CC="cc " CXX="c++  "  CPP="cpp "  AS="as" AR="ar" LD="ld" NM=nm  
OBJDUMP=objdump OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"  INSTALL=
"sh /storage/home/hiroki/freebsd/tools/install.sh"  PATH=/storage/home/hiroki/ob
j//storage/home/hiroki/zrouter/tmp//arm.arm/storage/home/hiroki/freebsd/tmp/lega
cy/usr/sbin:/storage/home/hiroki/obj//storage/home/hiroki/zrouter/tmp//arm.arm/s
torage/home/hiroki/freebsd/tmp/legacy/usr/bin:/storage/home/hiroki/obj//storage/
home/hiroki/zrouter/tmp//arm.arm/storage/home/hiroki/freebsd/tmp/legacy/bin:/sto
rage/home/hiroki/obj//storage/home/hiroki/zrouter/tmp//arm.arm/storage/home/hiro
ki/freebsd/tmp/usr/sbin:/storage/home/hiroki/obj//storage/home/hiroki/zrouter/tm
p//arm.arm/storage/home/hiroki/freebsd/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin
 /storage/home/hiroki/obj//storage/home/hiroki/zrouter/tmp//storage/home/hiroki/
freebsd/make.amd64/bmake  -f Makefile.inc1 DESTDIR=/storage/home/hiroki/obj//sto
rage/home/hiroki/zrouter/tmp//arm.arm/storage/home/hiroki/freebsd/tmp -DNO_FSCHG
 MK_HTML=no -DNO_LINT MK_MAN=no  MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=yes 
libraries
cd /storage/home/hiroki/freebsd;  /storage/home/hiroki/obj//storage/home/hiroki/
zrouter/tmp//storage/home/hiroki/freebsd/make.amd64/bmake -f Makefile.inc1 _prer
eq_libs;  /storage/home/hiroki/obj//storage/home/hiroki/zrouter/tmp//storage/hom
e/hiroki/freebsd/make.amd64/bmake -f Makefile.inc1 _startup_libs;  /storage/home
/hiroki/obj//storage/home/hiroki/zrouter/tmp//storage/home/hiroki/freebsd/make.a
md64/bmake -f Makefile.inc1 _prebuild_libs;  /storage/home/hiroki/obj//storage/h
ome/hiroki/zrouter/tmp//storage/home/hiroki/freebsd/make.amd64/bmake -f Makefile
.inc1 _generic_libs
===> gnu/lib/libssp/libssp_nonshared (obj,all,install)
cc   -O -pipe -DHAVE_CONFIG_H -I/storage/home/hiroki/freebsd/gnu/lib/libssp/libs
sp_nonshared/..  -I/storage/home/hiroki/freebsd/gnu/lib/libssp/libssp_nonshared/
../../../../contrib/gcclibs/libssp  -I/storage/home/hiroki/freebsd/gnu/lib/libss
p/libssp_nonshared/../../../../contrib/gcclibs/include -fPIC -DPIC -fvisibility=
hidden -march=armv4  -MD  -MF.depend.ssp-local.o -MTssp-local.o -std=gnu99    -Q
unused-arguments  -c /storage/home/hiroki/freebsd/gnu/lib/libssp/libssp_nonshare
d/../../../../contrib/gcclibs/libssp/ssp-local.c -o ssp-local.o
error: unknown target CPU 'armv4'
*** Error code 1

Stop.
bmake[5]: stopped in /storage/home/hiroki/freebsd/gnu/lib/libssp/libssp_nonshare
d
*** Error code 1

Stop.
bmake[4]: stopped in /storage/home/hiroki/freebsd
*** Error code 1

Stop.
bmake[3]: stopped in /storage/home/hiroki/freebsd
*** Error code 1

Stop.
bmake[2]: stopped in /storage/home/hiroki/freebsd
*** Error code 1

Stop.
make[1]: stopped in /storage/home/hiroki/freebsd
*** Error code 1

Stop.
make: stopped in /storage/home/hiroki/zrouter



----- Original Message -----
>From: Warner Losh <imp at bsdimp.com>
>To: Mori Hiroki <yamori813 at yahoo.co.jp> 
>Cc: "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
>Date: 2016/7/5, Tue 00:31
>Subject: Re: How to change gcc from clang at build kernel and world?
> 
>You should be able to get the build with
>WITH_GCC_BOOTSTRAP=YES WITH_GCC=YES WITHOUT_CLANG_BOOTSTRAP=YES and
>WITHOUT_CLANG=YES
>
>There's also supposed to be a command line arg to clang to keep it
>from using bx instructions. So that's messed up.
>
>But if the compiler-rt stuff, which I haven't looked at, has a naked
>bx instruction, we'll need an ifdef.
>
>Warner
>
>On Sun, Jul 3, 2016 at 6:46 PM, Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
>> Hi.
>>
>> I make support Eventtimer and FDT and INTRNG to cns11xx code.
>>
>> This is almost done. But hang up at init. I think it's a interrupt issue.
>>
>> https://gist.github.com/yamori813/ae047a28a825aac255e436fd8ccaf785
>>
>>
>> https://github.com/yamori813/freebsd/tree/zrouter/sys/arm/cavium/cns11xx
>>
>>
>> cns11xx is arm4(not arm4t).  arm build on head is change to use clang
>> several month ago. I want use gcc at buildworld and buildkernel.
>>
>> Because of clang use bx instruction. bx instruction not support arm4.
>>
>> How do I change to gcc from clang?
>>
>> I found bx instruction at
>>
>> contrib/compiler-rt/lib/builtins/arm/
>>
>> It must be changed bx to mov instruction.
>>
>> Regards.
>>
>> Hiroki Mori
>> _______________________________________________
>> freebsd-arm at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>
>
>


More information about the freebsd-arm mailing list