aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh2
-rwxr-xr-xlib/configure.sh3
-rw-r--r--lib/globals.sh2
-rwxr-xr-xlib/make.sh26
-rw-r--r--lib/stamp.sh2
5 files changed, 17 insertions, 18 deletions
diff --git a/lib/common.sh b/lib/common.sh
index 996e1e89..96dd3d52 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -276,7 +276,7 @@ get_builddir()
if test x"$2" = x"libgloss"; then
echo "${local_builds}/${host}/${target}/${dir}/${target}/libgloss"
else
- echo "${local_builds}/${host}/${target}/${dir}${2:+-$2}"
+ echo "${local_builds}/${host}/${target}/${dir}${ABI:+-$ABI}${2:+-$2}"
fi
return 0
diff --git a/lib/configure.sh b/lib/configure.sh
index d93e51cf..e21e7e9d 100755
--- a/lib/configure.sh
+++ b/lib/configure.sh
@@ -170,6 +170,9 @@ configure_build()
;;
*libc)
local opts="${opts} --build=${build} --host=${target} --target=${target} --prefix=/usr"
+ if test x"${ABI}" != x; then
+ local opts="${opts} CC=\"${target}-gcc -mabi=${ABI}\""
+ fi
dryrun "(mkdir -p ${sysroots}/usr/lib)"
;;
gcc*)
diff --git a/lib/globals.sh b/lib/globals.sh
index dbf8ae2a..84827e14 100644
--- a/lib/globals.sh
+++ b/lib/globals.sh
@@ -96,6 +96,8 @@ override_cflags=
override_ldflags=
override_runtestflags=
+aarch64_abilist=lp64
+
if test x"${BUILD_NUMBER}" = x; then
export BUILD_NUMBER=${RANDOM}
fi
diff --git a/lib/make.sh b/lib/make.sh
index 25fc8eba..24924226 100755
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -90,7 +90,16 @@ build_all()
if test x"${clibrary}" = x"eglibc"; then
build ${eglibc_version}
elif test x"${clibrary}" = x"glibc"; then
- build ${glibc_version}
+ if test `echo ${target} | grep -c aarch64` -gt 0; then
+ if test `echo ${aarch64_abilist} | grep -c lp64` -gt 0 ; then
+ ABI=lp64 build ${glibc_version}
+ fi
+ if test `echo ${aarch64_abilist} | grep -c ilp32` -gt 0 ; then
+ ABI=ilp32 build ${glibc_version}
+ fi
+ else
+ build ${glibc_version}
+ fi
elif test x"${clibrary}" = x"newlib"; then
build ${newlib_version}
build ${newlib_version} libgloss
@@ -582,21 +591,6 @@ make_install()
dryrun "copy_gcc_libs_to_sysroot \"${local_builds}/destdir/${host}/bin/${target}-gcc --sysroot=${sysroots}\""
fi
- if test "`echo ${tool} | grep -c glibc`" -gt 0 -a "`echo ${target} | grep -c aarch64`" -gt 0; then
- local dynamic_linker
- dynamic_linker="$(find_dynamic_linker "$sysroots" true)"
- local dynamic_linker_name="`basename ${dynamic_linker}`"
-
- # 64 bit architectures don't populate sysroot/lib, which unfortunately other
- # things look in for shared libraries.
- dryrun "rsync -a ${sysroots}/lib/ ${sysroots}/lib64/"
- dryrun "rm -rf ${sysroots}/lib"
- dryrun "(cd ${sysroots} && ln -sfnT lib64 lib)"
-# dryrun "(mv ${sysroots}/lib/ld-linux-aarch64.so.1 ${sysroots}/lib/ld-linux-aarch64.so.1.symlink)"
- dryrun "rm -f ${sysroots}/lib/ld-linux-aarch64.so.1"
- dryrun "ln -sfnT ${dynamic_linker_name} ${sysroots}/lib64/ld-linux-aarch64.so.1"
- fi
-
# FIXME: this is a seriously ugly hack required for building Canadian Crosses.
# Basically the gcc/auto-host.h produced when configuring GCC stage2 has a
# conflict as sys/types.h defines a typedef for caddr_t, and autoheader screws
diff --git a/lib/stamp.sh b/lib/stamp.sh
index af71648e..4d7f230a 100644
--- a/lib/stamp.sh
+++ b/lib/stamp.sh
@@ -50,7 +50,7 @@ get_stamp_name()
fi
#local stamp_name="stamp-${stamptype}-${name_fragment}${suffix:+-${suffix}}"
- local stamp_name="${name_fragment}${suffix:+-${suffix}}-${stamptype}.stamp"
+ local stamp_name="${name_fragment}${suffix:+-${suffix}}${ABI:+-${ABI}}-${stamptype}.stamp"
echo "${stamp_name}"
return 0
}