FreeBSD Bugzilla – Attachment 147691 Details for
Bug 193947
[PATCH] Allow lang/gcc to build on armv6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to allow the build on armv6
ports-gcc-armv6.diff (text/plain), 7.67 KB, created by
Andrew Turner
on 2014-09-26 14:05:43 UTC
(
hide
)
Description:
Patch to allow the build on armv6
Filename:
MIME Type:
Creator:
Andrew Turner
Created:
2014-09-26 14:05:43 UTC
Size:
7.67 KB
patch
obsolete
>Index: lang/gcc/Makefile >=================================================================== >--- lang/gcc/Makefile (revision 369259) >+++ lang/gcc/Makefile (working copy) >@@ -31,7 +31,7 @@ > DISTVERSION= ${PORTVERSION} > GCC_VERSION= ${PORTVERSION:C/(.+)\.[0-9]{8}/\1/} > SUFFIX= ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/} >-ONLY_FOR_ARCHS= amd64 i386 powerpc powerpc64 sparc64 >+ONLY_FOR_ARCHS= amd64 armv6 i386 powerpc powerpc64 sparc64 > USES= gmake iconv libtool makeinfo perl5 tar:bzip2 > USE_BINUTILS= yes > USE_PERL5= build >Index: lang/gcc/files/patch-arm-support >=================================================================== >--- lang/gcc/files/patch-arm-support (revision 0) >+++ lang/gcc/files/patch-arm-support (working copy) >@@ -0,0 +1,203 @@ >+--- gcc/config.gcc >++++ gcc/config.gcc >+@@ -267,7 +267,6 @@ case ${target} in >+ arm*-wince-pe* \ >+ | arm*-*-ecos-elf \ >+ | arm*-*-elf \ >+- | arm*-*-freebsd* \ >+ | arm*-*-linux* \ >+ | arm*-*-uclinux* \ >+ | i[34567]86-go32-* \ >+@@ -865,6 +864,27 @@ arm-wrs-vxworks) >+ extra_options="${extra_options} arm/vxworks.opt" >+ tmake_file="${tmake_file} arm/t-arm arm/t-vxworks" >+ ;; >++arm*-*-freebsd*) >++ tm_file="dbxelf.h elfos.h arm/elf.h arm/aout.h arm/bpabi.h ${tm_file} ${fbsd_tm_file} arm/freebsd.h" >++ tmake_file="${tmake_file} arm/t-arm arm/t-bpabi" >++ case $target in >++ armv6*-*-freebsd*) >++ tm_defines="${tm_defines} TARGET_FREEBSD_ARMv6=1" >++ ;; >++ esac >++ case $target in >++ arm*hf-*-freebsd*) >++ tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1" >++ ;; >++ esac >++ # The BPABI long long divmod functions return a 128-bit value in >++ # registers r0-r3. Correctly modeling that requires the use of >++ # TImode. >++ need_64bit_hwint=yes >++ # The EABI requires the use of __cxa_atexit. >++ default_use_cxa_atexit=yes >++ with_tls=${with_tls:-gnu2} >++ ;; >+ arm*-*-netbsdelf*) >+ tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h" >+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt" >+--- gcc/config.host >++++ gcc/config.host >+@@ -99,7 +99,7 @@ case ${host} in >+ esac >+ >+ case ${host} in >+- arm*-*-linux*) >++ arm*-*-freebsd* | arm*-*-linux*) >+ case ${target} in >+ arm*-*-*) >+ host_extra_gcc_objs="driver-arm.o" >+--- gcc/config/arm/arm.c >++++ gcc/config/arm/arm.c >+@@ -2062,6 +2062,8 @@ arm_option_override (void) >+ warning (0, "target CPU does not support unaligned accesses"); >+ unaligned_access = 0; >+ } >++ /* Force this off for now */ >++ unaligned_access = 0; >+ >+ if (TARGET_THUMB1 && flag_schedule_insns) >+ { >+--- /dev/null >++++ gcc/config/arm/freebsd.h >+@@ -0,0 +1,89 @@ >++/* Configuration file for ARM FreeBSD EABI targets. >++ Copyright (C) 2004-2013 Free Software Foundation, Inc. >++ >++ This file is part of GCC. >++ >++ GCC is free software; you can redistribute it and/or modify it >++ under the terms of the GNU General Public License as published >++ by the Free Software Foundation; either version 3, or (at your >++ option) any later version. >++ >++ GCC is distributed in the hope that it will be useful, but WITHOUT >++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY >++ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public >++ License for more details. >++ >++ You should have received a copy of the GNU General Public License >++ along with GCC; see the file COPYING3. If not see >++ <http://www.gnu.org/licenses/>. */ >++ >++#undef TARGET_DEFAULT_FLOAT_ABI >++#ifdef TARGET_FREEBSD_ARM_HARD_FLOAT >++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD >++#else >++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT >++#endif >++ >++/* We default to the "aapcs-linux" ABI so that enums are int-sized by >++ default. */ >++#undef ARM_DEFAULT_ABI >++#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX >++ >++#undef SUBTARGET_CPU_DEFAULT >++#ifdef TARGET_FREEBSD_ARMv6 >++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs >++#else >++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9 >++#endif >++ >++/* Clear the instruction cache from `BEG' to `END'. This makes a >++ call to the ARM_SYNC_ICACHE architecture specific syscall. */ >++#define CLEAR_INSN_CACHE(BEG, END) \ >++do \ >++ { \ >++ extern int sysarch(int number, void *args); \ >++ struct \ >++ { \ >++ unsigned int addr; \ >++ int len; \ >++ } s; \ >++ s.addr = (unsigned int)(BEG); \ >++ s.len = (END) - (BEG); \ >++ (void) sysarch (0, &s); \ >++ } \ >++while (0) >++ >++#if 0 >++/* arm.h clears this */ >++#undef SUBTARGET_CPP_SPEC >++#define SUBTARGET_CPP_SPEC FBSD_CPP_SPEC >++#endif >++ >++#undef SUBTARGET_EXTRA_ASM_SPEC >++#define SUBTARGET_EXTRA_ASM_SPEC \ >++ "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5}" TARGET_FIX_V4BX_SPEC \ >++ "%{fpic|fpie:-k} %{fPIC|fPIE:-k}" >++ >++#undef SUBTARGET_EXTRA_SPECS >++#define SUBTARGET_EXTRA_SPECS \ >++ { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \ >++ { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \ >++ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } >++ >++#undef LINK_SPEC >++#define LINK_SPEC " \ >++ %{p:%nconsider using `-pg' instead of `-p' with gprof(1) } \ >++ %{v:-V} \ >++ %{assert*} %{R*} %{rpath*} %{defsym*} \ >++ %{shared:-Bshareable %{h*} %{soname*}} \ >++ %{!shared: \ >++ %{!static: \ >++ %{rdynamic:-export-dynamic} \ >++ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ >++ %{static:-Bstatic}} \ >++ %{symbolic:-Bsymbolic} \ >++ -X %{mbig-endian:-EB} %{mlittle-endian:-EL}" >++ >++#undef FPUTYPE_DEFAULT >++#define FPUTYPE_DEFAULT "vfp" >++ >+--- libatomic/configure.tgt >++++ libatomic/configure.tgt >+@@ -33,8 +33,14 @@ case "${target_cpu}" in >+ >+ arm*) >+ ARCH=arm >+- # ??? Detect when -march=armv7 is already enabled. >+- try_ifunc=yes >++ case "${target}" in >++ arm*-*-freebsd*) >++ ;; >++ *) >++ # ??? Detect when -march=armv7 is already enabled. >++ try_ifunc=yes >++ ;; >++ esac >+ ;; >+ >+ sparc) >+--- libcpp/configure >++++ libcpp/configure >+@@ -7152,6 +7152,7 @@ fi >+ case $target in >+ aarch64*-*-* | \ >+ alpha*-*-* | \ >++ arm*-*-freebsd* | \ >+ arm*-*-*eabi* | \ >+ arm*-*-rtems* | \ >+ arm*-*-symbianelf* | \ >+--- libgcc/config.host >++++ libgcc/config.host >+@@ -319,6 +319,13 @@ arm-wrs-vxworks) >+ tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" >+ extra_parts="$extra_parts crti.o crtn.o" >+ ;; >++arm*-*-freebsd*) >++ tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix" >++ tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd" >++ tm_file="$tm_file arm/bpabi-lib.h" >++ unwind_header=config/arm/unwind-arm.h >++ tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" >++ ;; >+ arm*-*-netbsdelf*) >+ tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover" >+ ;; >+--- /dev/null >++++ libgcc/config/arm/t-freebsd >+@@ -0,0 +1,3 @@ >++# Use a version of div0 which raises SIGFPE. >++LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx >++ > >Property changes on: lang/gcc/files/patch-arm-support >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193947
:
147691
|
147919