Merge pull request #533 from stilor/gdb-7.12

Gdb 7.12
This commit is contained in:
Alexey Neyman 2017-01-16 09:01:10 -08:00 committed by GitHub
commit cc30c2c880
17 changed files with 220 additions and 52 deletions

View File

@ -37,7 +37,7 @@ endif # BINUTILS_CUSTOM
if ! BINUTILS_CUSTOM
config CC_BINUTILS_SHOW_LINARO
config BINUTILS_SHOW_LINARO
bool
prompt "Show Linaro versions"
help
@ -79,13 +79,13 @@ config BINUTILS_LINARO_V_2_25
bool
prompt "linaro-2.25.0-2015.01-2"
select BINUTILS_2_25_or_later
depends on CC_BINUTILS_SHOW_LINARO
depends on BINUTILS_SHOW_LINARO
config BINUTILS_LINARO_V_2_24
bool
prompt "linaro-2.24.0-2014.11-2"
select BINUTILS_2_24_or_later
depends on CC_BINUTILS_SHOW_LINARO
depends on BINUTILS_SHOW_LINARO
config BINUTILS_V_2_24
bool
@ -96,7 +96,7 @@ config BINUTILS_LINARO_V_2_23_2
bool
prompt "linaro-2.23.2-2013.10-4"
select BINUTILS_2_23_2_or_later
depends on CC_BINUTILS_SHOW_LINARO
depends on BINUTILS_SHOW_LINARO
config BINUTILS_V_2_23_2
bool

View File

@ -6,15 +6,13 @@ source "config/debug/gdb.in.cross"
source "config/debug/gdb.in.native"
source "config/debug/gdb.in.gdbserver"
if GDB_CROSS || GDB_NATIVE || GDB_GDBSERVER
comment "gdb version"
config GDB_CUSTOM
bool
prompt "Custom gdb"
depends on EXPERIMENTAL
select GDB_7_2_or_later
select GDB_7_12_or_later
help
The choosen gdb version shall be not downloaded. Instead use
a custom location to get the source.
@ -48,6 +46,7 @@ if ! GDB_CUSTOM
config DEBUG_GDB_SHOW_LINARO
bool
prompt "Show Linaro versions"
depends on OBSOLETE
help
Linaro is maintaining some advanced/more stable/experimental versions
of gdb, especially for the ARM architecture.
@ -68,6 +67,11 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
config GDB_V_7_12
bool
prompt "7.12"
select GDB_7_12_or_later
config GDB_V_7_11
bool
prompt "7.11"
@ -81,60 +85,71 @@ config GDB_V_7_10_1
config GDB_V_7_10
bool
prompt "7.10"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_9_1
bool
prompt "7.9.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_9
bool
prompt "7.9"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_8
bool
prompt "linaro-7.8-2014.09"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_8_2
bool
prompt "7.8.2"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_8_1
bool
prompt "7.8.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_8
bool
prompt "7.8"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_7_1
bool
prompt "linaro-7.7.1-2014.06"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_7_1
bool
prompt "7.7.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_7
bool
prompt "linaro-7.7-2014.05"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_7
bool
prompt "7.7"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_6
@ -146,79 +161,97 @@ config GDB_V_linaro_7_6
config GDB_V_7_6_1
bool
prompt "7.6.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_5
bool
prompt "linaro-7.5-2012.12"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_5_1
bool
prompt "7.5.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_4
bool
prompt "linaro-7.4-2012.06"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_4_1
bool
prompt "7.4.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_4
bool
prompt "7.4"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_linaro_7_3
bool
prompt "linaro-7.3-2011.12"
depends on DEBUG_GDB_SHOW_LINARO
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_3_1
bool
prompt "7.3.1"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_3a
bool
prompt "7.3a"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_2a
bool
prompt "7.2a"
depends on OBSOLETE
select GDB_7_2_or_later
config GDB_V_7_1a
bool
prompt "7.1a"
depends on OBSOLETE
select GDB_7_0_or_later
config GDB_V_7_0_1a
bool
prompt "7.0.1a"
depends on OBSOLETE
select GDB_7_0_or_later
config GDB_V_7_0a
bool
prompt "7.0a"
depends on OBSOLETE
select GDB_7_0_or_later
config GDB_V_6_8a
bool
depends on OBSOLETE
prompt "6.8a"
endchoice
endif # ! GDB_CUSTOM
config GDB_7_12_or_later
bool
select GDB_7_2_or_later
config GDB_7_2_or_later
bool
select GDB_7_0_or_later
@ -244,6 +277,7 @@ config GDB_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "7.12" if GDB_V_7_12
default "7.11" if GDB_V_7_11
default "7.10.1" if GDB_V_7_10_1
default "7.10" if GDB_V_7_10
@ -274,6 +308,3 @@ config GDB_VERSION
default "6.8a" if GDB_V_6_8a
endif # ! GDB_CUSTOM
endif # GDB_CROSS || GDB_NATIVE || GDB_GDBSERVER

View File

@ -5,6 +5,7 @@ config GDB_NATIVE
prompt "Native gdb"
depends on ! BARE_METAL
depends on ! BACKEND
depends on CC_LANG_CXX || !GDB_7_12_or_later
select EXPAT_TARGET
select NCURSES_TARGET
help

View File

@ -0,0 +1,28 @@
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "stopcode.h"
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
@@ -73,6 +74,10 @@
#define SPUFS_MAGIC 0x23c9b64e
#endif
+#ifndef __SIGRTMIN
+#define __SIGRTMIN SIGRTMIN
+#endif
+
/* This comment documents high-level logic of this file.
Waiting for events in sync mode
--- /dev/null
+++ b/gdb/stopcode.h
@@ -0,0 +1,4 @@
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+

View File

@ -0,0 +1,30 @@
Improve gnulib in gdb's guess work, gettimeofday() works in uClibcm promise.
This patch helps building x86_64-unknown-linux-uclibc toolchains, the final
gdb-native step otherwise fails when linking the libinproctrace.so
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Signed-off-by: Alexey Neyman <stilor@att.net>
diff -urpN gdb-7.12.orig/gdb/gnulib/configure gdb-7.12/gdb/gnulib/configure
--- gdb-7.12.orig/gdb/gnulib/configure 2017-01-13 13:42:11.773027566 -0800
+++ gdb-7.12/gdb/gnulib/configure 2017-01-13 13:44:32.518082618 -0800
@@ -13522,6 +13522,7 @@ else
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac
diff -urpN gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4
--- gdb-7.12.orig/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:42:11.777027595 -0800
+++ gdb-7.12/gdb/gnulib/import/m4/gettimeofday.m4 2017-01-13 13:43:55.781797640 -0800
@@ -111,6 +111,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
+ *-uclibc*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
esac

View File

@ -0,0 +1,35 @@
From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 7 Jun 2015 22:43:49 +0300
Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized
ar_base is uninitialized for cores w/o windowed registers as their
regmap doesn't have register 0x0100.
Check that ar_base is initialized and if not initialize it with a0_base.
gdb/
* xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is
initialized.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
gdb/xtensa-tdep.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 55e7d98..41f5ec1 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep)
tdep->num_regs = n;
}
+ if (tdep->ar_base == -1)
+ tdep->ar_base = tdep->a0_base;
+
/* Number of pseudo registers. */
tdep->num_pseudo_regs = n - tdep->num_regs;
--
1.8.1.4

View File

@ -0,0 +1,31 @@
From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Sun, 7 Jun 2015 23:15:39 +0300
Subject: [PATCH] WIP: *end of prologue* detection hack
see
http://www.esp8266.com/viewtopic.php?p=18461#p18461
http://www.esp8266.com/viewtopic.php?p=19026#p19026
http://www.esp8266.com/viewtopic.php?p=19683#p19683
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
gdb/xtensa-tdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 41f5ec1..6a7dba7 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch,
/* Find out, if we have an information about the prologue from DWARF. */
prologue_sal = find_pc_line (start, 0);
if (prologue_sal.line != 0) /* Found debug info. */
- body_pc = prologue_sal.end;
+ body_pc = prologue_sal.end + 40;
/* If we are going to analyze the prologue in general without knowing about
the current PC, make the best assumtion for the end of the prologue. */
--
1.8.1.4

View File

@ -158,6 +158,7 @@ addToolVersion() {
gdb)
# gdb-7.0 and above have special handling
ver_M=$(getVersionField "${version}" . 1)
ver_m=$(getVersionField "${version}" . 2)
if [ ${ver_M} -ge 7 ]; then
if [ ${ver_m} -ge 2 ]; then
SedExpr1="${SedExpr1}\n select GDB_7_2_or_later"

View File

@ -166,7 +166,7 @@ CT_DoArchUClibcHeaderDir() {
# If it is non-default multilib, add a suffix with architecture (reported by gcc)
# to the headers installation path.
if [ -n "${cflags}" ]; then
eval "${dir_var}="$( ${CT_TARGET}-gcc -print-multiarch ${cflags} )
eval "${dir_var}="$( ${CT_TARGET}-${CT_CC} -print-multiarch ${cflags} )
fi
}
@ -177,6 +177,6 @@ CT_DoArchMUSLHeaderDir() {
# If it is non-default multilib, add a suffix with architecture (reported by gcc)
# to the headers installation path.
if [ -n "${cflags}" ]; then
eval "${dir_var}="$( ${CT_TARGET}-gcc -print-multiarch ${cflags} )
eval "${dir_var}="$( ${CT_TARGET}-${CT_CC} -print-multiarch ${cflags} )
fi
}

View File

@ -168,7 +168,7 @@ cc_gcc_multilib_housekeeping() {
"directly; will use build-compiler for housekeeping."
# Since we cannot run the desired compiler, substitute build-CC with the assumption
# that the host-CC is configured in the same way.
cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-gcc"
cc="${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}"
fi
# sed: prepend dashes or do nothing if default is empty string
@ -646,7 +646,7 @@ do_gcc_core_backend() {
if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
CXX_FOR_BUILD=${CT_BUILD}-g++ \
GCC_FOR_TARGET=${CT_TARGET}-gcc"
GCC_FOR_TARGET=${CT_TARGET}-${CT_CC}"
else
repair_cc=""
fi
@ -711,16 +711,16 @@ do_gcc_core_backend() {
CT_DoExecLog ALL make install-{pdf,html}-gcc
fi
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
# to call the C compiler with the same, somewhat canonical name.
# check whether compiler has an extension
file="$( ls -1 "${prefix}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
if [ -f "${prefix}/bin/${CT_TARGET}-gcc${ext}" ]; then
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
fi
cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-gcc" \
cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
host="${host}"
}
@ -1153,15 +1153,15 @@ do_gcc_backend() {
CT_DoExecLog ALL make install-{pdf,html}-gcc
fi
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-${CT_CC} to always be able
# to call the C compiler with the same, somewhat canonical name.
# check whether compiler has an extension
file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc${ext}" ]; then
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
fi
cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-gcc" \
cc_gcc_multilib_housekeeping cc="${prefix}/bin/${CT_TARGET}-${CT_CC}" \
host="${host}"
}

View File

@ -41,8 +41,8 @@ do_debug_duma_build() {
CT_DoLog EXTRA "Building libraries '${libs}'"
CT_DoExecLog ALL \
make HOSTCC="${CT_BUILD}-gcc" \
CC="${CT_TARGET}-gcc" \
CXX="${CT_TARGET}-gcc" \
CC="${CT_TARGET}-${CT_CC}" \
CXX="${CT_TARGET}-g++" \
RANLIB="${CT_TARGET}-ranlib" \
DUMA_CPP="${DUMA_CPP}" \
${libs}

View File

@ -90,16 +90,20 @@ do_debug_gdb_build() {
cross_extra_config+=("--disable-nls")
fi
CPP_for_gdb="${CT_HOST}-cpp ${CT_CFLAGS_FOR_HOST}"
CC_for_gdb="${CT_HOST}-gcc ${CT_CFLAGS_FOR_HOST} ${CT_LDFLAGS_FOR_HOST}"
CXX_for_gdb="${CT_HOST}-g++ ${CT_CFLAGS_FOR_HOST} ${CT_LDFLAGS_FOR_HOST}"
LD_for_gdb="${CT_HOST}-ld ${CT_LDFLAGS_FOR_HOST}"
if [ "${CT_GDB_CROSS_STATIC}" = "y" ]; then
CC_for_gdb+=" -static"
CXX_for_gdb+=" -static"
LD_for_gdb+=" -static"
fi
case "${CT_HOST}" in
*darwin*)
# FIXME: Really, we should be testing for host compiler being clang.
CC_for_gdb+=" -Qunused-arguments"
CXX_for_gdb+=" -Qunused-arguments"
;;
esac
@ -107,7 +111,9 @@ do_debug_gdb_build() {
# are multiple consecutive spaces: sub-configure scripts replace them with a
# single space and then complain that $CC value changed from that in
# the master directory.
CPP_for_gdb=`echo $CPP_for_gdb`
CC_for_gdb=`echo $CC_for_gdb`
CXX_for_gdb=`echo $CXX_for_gdb`
LD_for_gdb=`echo $LD_for_gdb`
# Disable binutils options when building from the binutils-gdb repo.
@ -118,7 +124,9 @@ do_debug_gdb_build() {
CT_DoLog DEBUG "Extra config passed: '${cross_extra_config[*]}'"
CT_DoExecLog CFG \
CPP="${CPP_for_gdb}" \
CC="${CC_for_gdb}" \
CXX="${CXX_for_gdb}" \
LD="${LD_for_gdb}" \
"${gdb_src_dir}/configure" \
--build=${CT_BUILD} \
@ -165,7 +173,6 @@ do_debug_gdb_build() {
if [ "${CT_GDB_NATIVE}" = "y" ]; then
local -a native_extra_config
local -a gdb_native_CFLAGS
CT_DoStep INFO "Installing native gdb"
@ -208,12 +215,14 @@ do_debug_gdb_build() {
[ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && \
native_extra_config+=("--disable-nls")
if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then
CC_for_gdb="${CT_TARGET}-gcc -static"
LD_for_gdb="${CT_TARGET}-ld -static"
else
CC_for_gdb="${CT_TARGET}-gcc"
CPP_for_gdb="${CT_TARGET}-cpp"
CC_for_gdb="${CT_TARGET}-${CT_CC}"
CXX_for_gdb="${CT_TARGET}-g++"
LD_for_gdb="${CT_TARGET}-ld"
if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then
CC_for_gdb+=" -static"
CXX_for_gdb+=" -static"
LD_for_gdb+=" -static"
fi
export ac_cv_func_strncmp_works=yes
@ -226,9 +235,10 @@ do_debug_gdb_build() {
CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'"
CT_DoExecLog CFG \
CPP="${CPP_for_gdb}" \
CC="${CC_for_gdb}" \
CXX="${CXX_for_gdb}" \
LD="${LD_for_gdb}" \
CFLAGS="${gdb_native_CFLAGS[*]}" \
"${gdb_src_dir}/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
@ -246,7 +256,7 @@ do_debug_gdb_build() {
"${native_extra_config[@]}"
CT_DoLog EXTRA "Building native gdb"
CT_DoExecLog ALL make ${JOBSFLAGS} CC=${CT_TARGET}-${CT_CC}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing native gdb"
CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
@ -261,6 +271,7 @@ do_debug_gdb_build() {
if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
local -a gdbserver_extra_config
local gdbserver_LDFLAGS
CT_DoStep INFO "Installing gdbserver"
CT_DoLog EXTRA "Configuring gdbserver"
@ -294,7 +305,7 @@ do_debug_gdb_build() {
gdbserver_extra_config+=("--disable-gas")
CT_DoExecLog CFG \
CC="${CT_TARGET}-gcc" \
CC="${CT_TARGET}-${CT_CC}" \
CPP="${CT_TARGET}-cpp" \
LD="${CT_TARGET}-ld" \
LDFLAGS="${gdbserver_LDFLAGS}" \

View File

@ -31,7 +31,7 @@ do_debug_strace_build() {
CT_DoLog EXTRA "Configuring strace"
CT_DoExecLog CFG \
CFLAGS_FOR_BUILD="-I ${CT_BUILD_DIR}/build-strace-headers" \
CC="${CT_TARGET}-gcc" \
CC="${CT_TARGET}-${CT_CC}" \
CPP="${CT_TARGET}-cpp" \
LD="${CT_TARGET}-ld" \
"${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \

View File

@ -252,7 +252,7 @@ do_libc_backend_once() {
# but they are not passed by configure. Thus, pass everything in CC instead.
CT_DoExecLog CFG \
BUILD_CC=${CT_BUILD}-gcc \
CC="${CT_TARGET}-gcc ${glibc_cflags}" \
CC="${CT_TARGET}-${CT_CC} ${glibc_cflags}" \
AR=${CT_TARGET}-ar \
RANLIB=${CT_TARGET}-ranlib \
"${CONFIG_SHELL}" \
@ -362,7 +362,7 @@ do_libc_backend_once() {
# However, since we will never actually execute its code,
# it doesn't matter what it contains. So, treating '/dev/null'
# as a C source file, we produce a dummy 'libc.so' in one step
CT_DoExecLog ALL "${CT_TARGET}-gcc" ${multi_flags} \
CT_DoExecLog ALL "${CT_TARGET}-${CT_CC}" ${multi_flags} \
-nostdlib \
-nostartfiles \
-shared \

View File

@ -126,7 +126,7 @@ do_libc_backend_once() {
obj/crt/crt1.o obj/crt/crti.o obj/crt/crtn.o
CT_DoLog EXTRA "Installing C library start files"
CT_DoExecLog ALL cp -av obj/crt/crt*.o "${multi_root}${multilib_dir}"
CT_DoExecLog ALL ${CT_TARGET}-gcc -nostdlib \
CT_DoExecLog ALL ${CT_TARGET}-${CT_CC} -nostdlib \
-nostartfiles -shared -x c /dev/null -o "${multi_root}${multilib_dir}/libc.so"
fi
if [ "${libc_mode}" = "final" ]; then

View File

@ -197,7 +197,7 @@ do_libc_backend_once() {
# libm.so is needed for ppc, as libgcc is linked against libm.so
# No problem to create it for other archs.
CT_DoLog EXTRA "Building dummy shared libs"
CT_DoExecLog ALL "${CT_TARGET}-gcc" -nostdlib -nostartfiles \
CT_DoExecLog ALL "${CT_TARGET}-${CT_CC}" -nostdlib -nostartfiles \
-shared ${multi_flags} -x c /dev/null -o libdummy.so
CT_DoLog EXTRA "Installing start files"
@ -470,7 +470,7 @@ do_libc_ldso_fixup() {
multilib_dir="/lib/${multi_os_dir}"
CT_SanitizeVarDir multilib_dir
CT_DoExecLog ALL "${CT_TARGET}-gcc" -o test-ldso ../test-ldso.c ${multi_flags}
CT_DoExecLog ALL "${CT_TARGET}-${CT_CC}" -o test-ldso ../test-ldso.c ${multi_flags}
if [ -r "test-ldso.gdb" ]; then
binary="test-ldso.gdb"
else

View File

@ -1621,7 +1621,7 @@ CT_IterateMultilibs() {
# If gcc is not configured for multilib, it still prints a single line
# for the default settings
multilibs=( $("${CT_TARGET}-gcc" -print-multi-lib 2>/dev/null) )
multilibs=( $("${CT_TARGET}-${CT_CC}" -print-multi-lib 2>/dev/null) )
CT_DoExecLog ALL rm -rf "sysroot-check"
for multilib in "${multilibs[@]}"; do
# GCC makes the distinction between:
@ -1657,8 +1657,8 @@ CT_IterateMultilibs() {
# multi_os_dir_gcc.
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
multi_dir="${multilib%%;*}"
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
multi_root=$( "${CT_TARGET}-gcc" -print-sysroot ${multi_flags} )
multi_os_dir=$( "${CT_TARGET}-${CT_CC}" -print-multi-os-directory ${multi_flags} )
multi_root=$( "${CT_TARGET}-${CT_CC}" -print-sysroot ${multi_flags} )
root_suffix="${multi_root#${CT_SYSROOT_DIR}}"
CT_DoExecLog ALL mkdir -p "sysroot-check${root_suffix}"
if [ -e "sysroot-check${root_suffix}/seen" ]; then
@ -1677,10 +1677,10 @@ CT_IterateMultilibs() {
for multilib in "${multilibs[@]}"; do
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
multi_dir="${multilib%%;*}"
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
multi_os_dir=$( "${CT_TARGET}-${CT_CC}" -print-multi-os-directory ${multi_flags} )
multi_os_dir_gcc="${multi_os_dir}"
multi_root=$( "${CT_TARGET}-gcc" -print-sysroot ${multi_flags} )
multi_target=$( "${CT_TARGET}-gcc" -print-multiarch ${multi_flags} )
multi_root=$( "${CT_TARGET}-${CT_CC}" -print-sysroot ${multi_flags} )
multi_target=$( "${CT_TARGET}-${CT_CC}" -print-multiarch ${multi_flags} )
root_suffix="${multi_root#${CT_SYSROOT_DIR}}"
# If GCC did not report the target tuple (i.e. this configuration is not