--- lib/make.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/make.sh b/lib/make.sh index fb7137c..b917ece 100755 --- a/lib/make.sh +++ b/lib/make.sh @@ -460,8 +460,15 @@ make_install() local srcdir="`get_srcdir $1 ${2:+$2}`" if test `echo ${target} | grep -c aarch64` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm64 INSTALL_HDR_PATH=${sysroots}/usr" - else + elif test `echo ${target} | grep -c i.86` -gt 0; then + dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=i386 INSTALL_HDR_PATH=${sysroots}/usr" + elif test `echo ${target} | grep -c x86_64` -gt 0; then + dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=x86_64 INSTALL_HDR_PATH=${sysroots}/usr" + elif test `echo ${target} | grep -c arm` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm INSTALL_HDR_PATH=${sysroots}/usr" + else + warning "Unknown arch for make headers_install!" + return 1 fi if test $? != "0"; then warning "Make headers_install failed!"
This is to avoid the situation of failing to build glibc with undefined references to __stack_chk_guard. Force gcc to assume that the C library it is using (which does not exist yet) has support for SSP. --- config/gcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/gcc.conf b/config/gcc.conf index 9f0f273..79cca1c 100644 --- a/config/gcc.conf +++ b/config/gcc.conf @@ -69,7 +69,7 @@ if test x"${build}" != x"${target}"; then # stage1_flags are used to build the initial C compiler, which is used to compile # the C library. We disable most everything, as the second GCC build will be # able to use the C library built with the first GCC build. - stage1_flags="--disable-libssp --disable-libquadmath --disable-threads --without-headers --with-newlib --disable-libmudflap --disable-bootstrap --disable-decimal-float --disable-libgomp --disable-libatomic --disable-libsanitizer --disable-plugins --disable-libitm MAKEINFO=echo --enable-languages=c --with-sysroot=${local_builds}/sysroot-${target} --disable-shared" + stage1_flags="--disable-libssp --disable-libquadmath --disable-threads --without-headers --with-newlib --disable-libmudflap --disable-bootstrap --disable-decimal-float --disable-libgomp --disable-libatomic --disable-libsanitizer --disable-plugins --disable-libitm MAKEINFO=echo --enable-languages=c --with-sysroot=${local_builds}/sysroot-${target} --disable-shared --with-glibc-version=2.18"
# Add platform specific flags case ${target} in
On 09/29/2014 09:40 AM, Will Newton wrote:
Can you use Gerrit for these (ie... git-review) ? Otherwise I'll patch manually.
- rob -
lib/make.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/make.sh b/lib/make.sh index fb7137c..b917ece 100755 --- a/lib/make.sh +++ b/lib/make.sh @@ -460,8 +460,15 @@ make_install() local srcdir="`get_srcdir $1 ${2:+$2}`" if test `echo ${target} | grep -c aarch64` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm64 INSTALL_HDR_PATH=${sysroots}/usr"
else
elif test `echo ${target} | grep -c i.86` -gt 0; then
dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=i386 INSTALL_HDR_PATH=${sysroots}/usr"
elif test `echo ${target} | grep -c x86_64` -gt 0; then
dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=x86_64 INSTALL_HDR_PATH=${sysroots}/usr"
elif test `echo ${target} | grep -c arm` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm INSTALL_HDR_PATH=${sysroots}/usr"
else
warning "Unknown arch for make headers_install!"
return 1 fi if test $? != "0"; then warning "Make headers_install failed!"
I think this is not scalarable.
Why not use a switch instead of multiple ifs. Something like this (copied from our internal build scripts):
# Convert the target triplet into a linux target. case ${target} in arm*) linux_target=arm ;; powerpc*) linux_target=powerpc ;; i[34567]86-* | x86_64-*) linux_target=x86 ;; mips*) linux_target=mips ;; aarch64*) linux_target=arm64 ;; *) warning "please update table in build-common for your target"; exit 1 ;; esac dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=${linux_target} INSTALL_HDR_PATH=${sysroots}/usr"
--- CUT --- Then the code becomes a little easier to maintain and when a new target is supported you just have to add a line which sets linux_target rather than copy the whole "make headers_install" line.
Thanks, Andrew Pinski
-----Original Message----- From: linaro-toolchain-bounces@lists.linaro.org [mailto:linaro-toolchain-bounces@lists.linaro.org] On Behalf Of Will Newton Sent: Monday, September 29, 2014 9:40 AM To: linaro-toolchain@lists.linaro.org Subject: [PATCH 1/2] lib/make.sh: Add support for installing headers for i686 and x86_64
--- lib/make.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/make.sh b/lib/make.sh index fb7137c..b917ece 100755 --- a/lib/make.sh +++ b/lib/make.sh @@ -460,8 +460,15 @@ make_install() local srcdir="`get_srcdir $1 ${2:+$2}`" if test `echo ${target} | grep -c aarch64` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm64 INSTALL_HDR_PATH=${sysroots}/usr" - else + elif test `echo ${target} | grep -c i.86` -gt 0; then + dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=i386 INSTALL_HDR_PATH=${sysroots}/usr" + elif test `echo ${target} | grep -c x86_64` -gt 0; then + dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=x86_64 INSTALL_HDR_PATH=${sysroots}/usr" + elif test `echo ${target} | grep -c arm` -gt 0; then dryrun "make ${make_opts} -C ${srcdir} headers_install ARCH=arm INSTALL_HDR_PATH=${sysroots}/usr" + else + warning "Unknown arch for make headers_install!" + return 1 fi if test $? != "0"; then warning "Make headers_install failed!"
On 09/29/2014 10:39 AM, Pinski, Andrew wrote:
I think this is not scalarable.
Why not use a switch instead of multiple ifs. Something like this (copied from our internal build scripts):
I agree with you, I prefer to use a switch instead of elseif. I did push the patch since Maxim needed it, but Will, can you rework this to use a switch ? I'm busy tracking down the other problem with backport validation.
- rob -
linaro-toolchain@lists.linaro.org