mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-15 01:09:56 +00:00
Backport #633 from trunk:
Sanitise and use CT_CC_NATIVE. Comment inclusion of scripts/functions. /branches/1.1/scripts/build/cc_gcc.sh | 6 6 0 0 ++++++ /branches/1.1/scripts/crosstool.sh | 7 6 1 0 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-)
This commit is contained in:
parent
899e3a9302
commit
1096033691
@ -65,6 +65,7 @@ do_cc_core_static() {
|
|||||||
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
|
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
|
||||||
|
|
||||||
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
|
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
|
||||||
|
CC_FOR_BUILD="${CT_CC_NATIVE}" \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
||||||
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
||||||
${CT_CANADIAN_OPT} \
|
${CT_CANADIAN_OPT} \
|
||||||
@ -81,6 +82,7 @@ do_cc_core_static() {
|
|||||||
--enable-symvers=gnu \
|
--enable-symvers=gnu \
|
||||||
--enable-languages=c \
|
--enable-languages=c \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
|
--enable-target-optspace \
|
||||||
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
||||||
|
|
||||||
if [ "${CT_CANADIAN}" = "y" ]; then
|
if [ "${CT_CANADIAN}" = "y" ]; then
|
||||||
@ -117,6 +119,7 @@ do_cc_core_shared() {
|
|||||||
|
|
||||||
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
|
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
|
||||||
|
|
||||||
|
CC_FOR_BUILD="${CT_CC_NATIVE}" \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
||||||
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
||||||
${CT_CANADIAN_OPT} \
|
${CT_CANADIAN_OPT} \
|
||||||
@ -131,6 +134,7 @@ do_cc_core_shared() {
|
|||||||
--enable-symvers=gnu \
|
--enable-symvers=gnu \
|
||||||
--enable-languages=c \
|
--enable-languages=c \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
|
--enable-target-optspace \
|
||||||
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
||||||
|
|
||||||
# HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
|
# HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
|
||||||
@ -225,6 +229,7 @@ do_cc() {
|
|||||||
# detection problem only matters for gcc-3.2.x and later, I think.
|
# detection problem only matters for gcc-3.2.x and later, I think.
|
||||||
# --disable-nls to work around crash bug on ppc405, but also because
|
# --disable-nls to work around crash bug on ppc405, but also because
|
||||||
# embedded systems don't really need message catalogs...
|
# embedded systems don't really need message catalogs...
|
||||||
|
CC_FOR_BUILD="${CT_CC_NATIVE}" \
|
||||||
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
||||||
TARGET_CFLAGS="${CT_TARGET_CFLAGS}" \
|
TARGET_CFLAGS="${CT_TARGET_CFLAGS}" \
|
||||||
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
|
||||||
@ -239,6 +244,7 @@ do_cc() {
|
|||||||
--enable-symvers=gnu \
|
--enable-symvers=gnu \
|
||||||
--enable-c99 \
|
--enable-c99 \
|
||||||
--enable-long-long \
|
--enable-long-long \
|
||||||
|
--enable-target-optspace \
|
||||||
${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
|
||||||
|
|
||||||
if [ "${CT_CANADIAN}" = "y" ]; then
|
if [ "${CT_CANADIAN}" = "y" ]; then
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
# and builds the tools.
|
# and builds the tools.
|
||||||
|
|
||||||
# Parse the common functions
|
# Parse the common functions
|
||||||
|
# Note: some initialisation and sanitizing is done while parsing this file,
|
||||||
|
# most notably:
|
||||||
|
# - set trap handler on errors,
|
||||||
|
# - don't hash commands lookups,
|
||||||
|
# - initialise logging.
|
||||||
. "${CT_LIB_DIR}/scripts/functions"
|
. "${CT_LIB_DIR}/scripts/functions"
|
||||||
|
|
||||||
CT_STAR_DATE=`CT_DoDate +%s%N`
|
CT_STAR_DATE=`CT_DoDate +%s%N`
|
||||||
@ -386,7 +391,7 @@ if [ -z "${CT_RESTART}" ]; then
|
|||||||
# Do that:
|
# Do that:
|
||||||
CT_DoLog DEBUG "Making build system tools available"
|
CT_DoLog DEBUG "Making build system tools available"
|
||||||
mkdir -p "${CT_PREFIX_DIR}/bin"
|
mkdir -p "${CT_PREFIX_DIR}/bin"
|
||||||
for tool in ar as dlltool gcc g++ gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do
|
for tool in ar as dlltool ${CT_CC_NATIVE:=gcc} gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do
|
||||||
tmp=`CT_Which ${tool}`
|
tmp=`CT_Which ${tool}`
|
||||||
if [ -n "${tmp}" ]; then
|
if [ -n "${tmp}" ]; then
|
||||||
ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}"
|
ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}"
|
||||||
|
Loading…
Reference in New Issue
Block a user