mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [OSELAS.Toolchain PATCH 0/2] Add armv4 toolchain without thumb
@ 2013-07-06 17:00 Andreas Bießmann
  2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 1/2] patches/gcc-4.7.2: add eabi fix for armv4 Andreas Bießmann
  2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 2/2] add new arm-v4-linux-gnueabi toolchain Andreas Bießmann
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-06 17:00 UTC (permalink / raw)
  To: PTXdist ML; +Cc: Andreas Bießmann

These two patches enable the current OSELAS.Toolchain-2012.12 to generate a
armv4 eabi toolchain. armv4 devices (like strongarm or fa526) have no thumb
support and do not understand the BX intrinsic.
The added patch enables the GCC to save the target machine and instruct the
linker later on to replace BX by MOV or other matching intrinsics.

Andreas Bießmann (2):
  patches/gcc-4.7.2: add eabi fix for armv4
  add new arm-v4-linux-gnueabi toolchain

 .../0501-arm-eabi-pass-fix-v4bx-to-ld.patch        |   49 ++++++++
 patches/gcc-4.7.2/series                           |    3 +-
 ....0_binutils-2.22_kernel-3.6-sanitized.ptxconfig |  125 ++++++++++++++++++++
 3 files changed, 176 insertions(+), 1 deletion(-)
 create mode 100644 patches/gcc-4.7.2/0501-arm-eabi-pass-fix-v4bx-to-ld.patch
 create mode 100644 ptxconfigs/arm-v4-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized.ptxconfig

-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [OSELAS.Toolchain PATCH 1/2] patches/gcc-4.7.2: add eabi fix for armv4
  2013-07-06 17:00 [ptxdist] [OSELAS.Toolchain PATCH 0/2] Add armv4 toolchain without thumb Andreas Bießmann
@ 2013-07-06 17:00 ` Andreas Bießmann
  2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 2/2] add new arm-v4-linux-gnueabi toolchain Andreas Bießmann
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-06 17:00 UTC (permalink / raw)
  To: PTXdist ML; +Cc: Andreas Bießmann

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>

---
 .../0501-arm-eabi-pass-fix-v4bx-to-ld.patch        |   49 ++++++++++++++++++++
 patches/gcc-4.7.2/series                           |    3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 patches/gcc-4.7.2/0501-arm-eabi-pass-fix-v4bx-to-ld.patch

diff --git a/patches/gcc-4.7.2/0501-arm-eabi-pass-fix-v4bx-to-ld.patch b/patches/gcc-4.7.2/0501-arm-eabi-pass-fix-v4bx-to-ld.patch
new file mode 100644
index 0000000..d855fa5
--- /dev/null
+++ b/patches/gcc-4.7.2/0501-arm-eabi-pass-fix-v4bx-to-ld.patch
@@ -0,0 +1,49 @@
+From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <andreas@biessmann.de>
+Date: Sat, 8 Jun 2013 16:35:23 +0200
+Subject: [PATCH] arm:eabi: pass --fix-v4bx to ld
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From https://raw.github.com/openembedded/oe-core/master/meta/recipes-devtools/gcc/gcc-4.7/gcc-armv4-pass-fix-v4bx-to-ld.patch
+
+---8<---
+The LINK_SPEC for linux gets overwritten by linux-eabi.h which
+means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
+the option is not passed to linker when chosing march=armv4
+This patch redefines this in linux-eabi.h and reinserts it
+for eabi defaulting toolchains.
+
+We might want to send it upstream
+
+Upstream-Status: Pending
+
+-Khem
+--->8---
+
+Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
+---
+ gcc/config/arm/linux-eabi.h |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 80bd825..c04e60f 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -64,10 +64,15 @@
+ #undef  GLIBC_DYNAMIC_LINKER
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+ 
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"	\
++  "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+-#define LINK_SPEC BE8_LINK_SPEC						\
++#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC			\
+   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
+ 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+ 
diff --git a/patches/gcc-4.7.2/series b/patches/gcc-4.7.2/series
index 7951514..5b3b453 100644
--- a/patches/gcc-4.7.2/series
+++ b/patches/gcc-4.7.2/series
@@ -19,6 +19,7 @@
 0400-add-support-for-arm-linux-eabi-triplets-useful-for-a.patch
 #tag:OpenEmbedded --start-number 500
 0500-Fix-Argument-list-too-long-error.patch
+0501-arm-eabi-pass-fix-v4bx-to-ld.patch
 #tag:Linaro --start-number 600
 0600-Backport-the-change-to-the-hard-float-loader-path.-C.patch
-# ea3731c90748fd21a473c04e08e5f9f3  - git-ptx-patches magic
+# 1dc326873cd1b3aab51b38c30b65c221  - git-ptx-patches magic
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ptxdist] [OSELAS.Toolchain PATCH 2/2] add new arm-v4-linux-gnueabi toolchain
  2013-07-06 17:00 [ptxdist] [OSELAS.Toolchain PATCH 0/2] Add armv4 toolchain without thumb Andreas Bießmann
  2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 1/2] patches/gcc-4.7.2: add eabi fix for armv4 Andreas Bießmann
@ 2013-07-06 17:00 ` Andreas Bießmann
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-06 17:00 UTC (permalink / raw)
  To: PTXdist ML; +Cc: Andreas Bießmann

This toolchain has libc for armv4 without thumb support (namely some older
stongarm and fa526 processor).

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
 ....0_binutils-2.22_kernel-3.6-sanitized.ptxconfig |  125 ++++++++++++++++++++
 1 file changed, 125 insertions(+)
 create mode 100644 ptxconfigs/arm-v4-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized.ptxconfig

diff --git a/ptxconfigs/arm-v4-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized.ptxconfig b/ptxconfigs/arm-v4-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized.ptxconfig
new file mode 100644
index 0000000..a4287f5
--- /dev/null
+++ b/ptxconfigs/arm-v4-linux-gnueabi_gcc-4.7.2_glibc-2.16.0_binutils-2.22_kernel-3.6-sanitized.ptxconfig
@@ -0,0 +1,125 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# PTXdist 2012.12.0
+#
+PTXCONF__ptxconfig_MAGIC__=y
+PTXCONF_BUILD_TOOLCHAIN=y
+PTXCONF_NO_PLATFORM=y
+PTXCONF_PROJECT="OSELAS.Toolchain-2012.12.1"
+
+#
+# ----------------------------------
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_M68K is not set
+# PTXCONF_ARCH_MIPS is not set
+# PTXCONF_ARCH_POWERPC is not set
+# PTXCONF_ARCH_I386 is not set
+# PTXCONF_ARCH_X86_64 is not set
+# PTXCONF_ARCH_AVR is not set
+# PTXCONF_ARCH_AVR32 is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="arm-v4-linux-gnueabi"
+PTXCONF_SIZEOF_LONG_DOUBLE="8"
+
+#
+# ----------------------------------
+#
+PTXCONF_LIBC_HEADERS=y
+PTXCONF_LIBC_FIRST=y
+PTXCONF_LIBC=y
+PTXCONF_LIBC_GLIBC=y
+# PTXCONF_LIBC_UCLIBC is not set
+# PTXCONF_LIBC_NEWLIB is not set
+# PTXCONF_LIBC_MINGW is not set
+# PTXCONF_LIBC_AVR is not set
+PTXCONF_TOOLCHAIN_ENABLE_SYSROOT=y
+PTXCONF_TOOLCHAIN_CONFIG_SYSROOT="--with-sysroot=${SYSROOT}"
+PTXCONF_TOOLCHAIN_DISABLE_MULTILIB=y
+PTXCONF_TOOLCHAIN_CONFIG_MULTILIB="--disable-multilib"
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FIRST=y
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.16.0"
+PTXCONF_GLIBC_MD5="b1030e3c7150419bf8bd0ba0017cdbc7"
+PTXCONF_GLIBC_TIMESTAMP=""
+PTXCONF_GLIBC_SERIES=""
+PTXCONF_GLIBC_ENABLE_KERNEL="2.6.32"
+PTXCONF_GLIBC_CONFIG_EXTRA="--without-fp"
+PTXCONF_GLIBC_CONFIG_EXTRA_CROSS="--enable-obsolete-rpc"
+PTXCONF_GLIBC_HEADERS_FAKE_CROSS="-D__ARM_EABI__"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_EXTRA_ADDONS=""
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_GLIBC_PORTS_MD5="668bcd584718ff0c6aa2f14b668595b6"
+PTXCONF_GLIBC_PORTS_TIMESTAMP="${PTXCONF_GLIBC_TIMESTAMP}"
+PTXCONF_GLIBC_PORTS_SERIES=""
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.22"
+PTXCONF_CROSS_BINUTILS_MD5="ee0f10756c84979622b992a4a61ea3f5"
+# PTXCONF_CROSS_ELF2FLT is not set
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="3.6"
+PTXCONF_KERNEL_HEADERS_MD5="1a1760420eac802c541a20ab51a093d1"
+PTXCONF_KERNEL_HEADERS_SANITIZED=y
+PTXCONF_CROSS_GCC=y
+PTXCONF_CROSS_GCC_VERSION="4.7.2"
+PTXCONF_CROSS_GCC_MD5="cc308a0891e778cfda7a151ab8a6e762"
+PTXCONF_CROSS_GCC_DL_VERSION="${PTXCONF_CROSS_GCC_VERSION}"
+PTXCONF_CROSS_GCC_PKGVERSION="${PTXCONF_PROJECT}"
+PTXCONF_CROSS_GCC_43=y
+PTXCONF_CROSS_GCC_45=y
+PTXCONF_CROSS_GCC_SERIES=""
+PTXCONF_CROSS_GCC_CONFIG_EXTRA="--with-float=soft --with-fpu=vfp --with-arch=armv4"
+
+#
+# Additional supported languages:
+#
+PTXCONF_CROSS_GCC_LANG_C=y
+PTXCONF_CROSS_GCC_LANG_CXX=y
+# PTXCONF_CROSS_GCC_LANG_FORTRAN is not set
+# PTXCONF_CROSS_GCC_LANG_JAVA is not set
+PTXCONF_CROSS_GCC_ENABLE_CXA_ATEXIT=y
+PTXCONF_CROSS_GCC_CONFIG_CXA_ATEXIT="--enable-__cxa_atexit"
+PTXCONF_CROSS_GCC_DISABLE_SJLJ_EXCEPTIONS=y
+PTXCONF_CROSS_GCC_CONFIG_SJLJ_EXCEPTIONS="--disable-sjlj-exceptions"
+PTXCONF_CROSS_GCC_DISABLE_LIBSSP=y
+PTXCONF_CROSS_GCC_CONFIG_LIBSSP="--disable-libssp"
+PTXCONF_CROSS_GCC_ENABLE_SHARED=y
+PTXCONF_CROSS_GCC_CONFIG_SHARED="--enable-shared"
+PTXCONF_CROSS_GCC_THREADS_POSIX=y
+PTXCONF_CROSS_GCC_THREADS="posix"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GDB=y
+PTXCONF_CROSS_GDB_VERSION="7.5"
+PTXCONF_CROSS_GDB_MD5="24a6779a9fe0260667710de1b082ef61"
+PTXCONF_CROSS_TOOLCHAIN=y
+PTXCONF_HOST_EXPAT=y
+PTXCONF_HOST_GMP=y
+PTXCONF_HOST_MPC=y
+PTXCONF_HOST_MPFR=y
+PTXCONF_HOST_ZLIB=y
+PTXCONF_HOST_LIBELF=y
+PTXCONF_HOST_AUTOTOOLS_AUTOCONF=y
+
+#
+# ----------------------------------
+#
+
+#
+# misc                        
+#
+PTXCONF_PREFIX="/opt"
+PTXCONF_PREFIX_KERNEL="-sanitized"
+PTXCONF_PREFIX_TCID="gcc-${PTXCONF_CROSS_GCC_VERSION}${PTXCONF_PREFIX_JAVA}-glibc-${PTXCONF_GLIBC_VERSION}-binutils-${PTXCONF_CROSS_BINUTILS_VERSION}-kernel-${PTXCONF_KERNEL_HEADERS_VERSION}${PTXCONF_PREFIX_KERNEL}"
+PTXCONF_SYSROOT_HOST="${PTXDIST_PLATFORMDIR}/sysroot-host"
+PTXCONF_SYSROOT_CROSS="${PTX_AUTOBUILD_DESTDIR}${PTXCONF_PREFIX}/${PTXCONF_PROJECT}/${PTXCONF_GNU_TARGET}/${PTXCONF_PREFIX_TCID}"
+PTXCONF_SYSROOT_TARGET="${PTXCONF_SYSROOT_CROSS}/sysroot-${PTXCONF_GNU_TARGET}"
+PTXCONF_PLATFORM="${PTXCONF_GNU_TARGET}-${PTXCONF_PREFIX_TCID}"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+# PTXCONF_TOOLCHAIN_DEBUG is not set
+PTXCONF_CONFIGFILE_VERSION="2012.12.1"
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-06 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-06 17:00 [ptxdist] [OSELAS.Toolchain PATCH 0/2] Add armv4 toolchain without thumb Andreas Bießmann
2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 1/2] patches/gcc-4.7.2: add eabi fix for armv4 Andreas Bießmann
2013-07-06 17:00 ` [ptxdist] [OSELAS.Toolchain PATCH 2/2] add new arm-v4-linux-gnueabi toolchain Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox