mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Merge pull request #4344 from HiassofT/le10-remote-gdb
Support building of a remote/cross gdb
This commit is contained in:
+11
-3
@@ -208,6 +208,7 @@ setup_pkg_config_host() {
|
||||
}
|
||||
|
||||
setup_toolchain() {
|
||||
local have_gold="no"
|
||||
if [ "$LTO_SUPPORT" = "yes" ]; then
|
||||
if flag_enabled "lto-parallel" "no"; then
|
||||
TARGET_CFLAGS+=" $FLAGS_OPTIM_LTO_PARALLEL $FLAGS_OPTIM_LTO_NO_FAT"
|
||||
@@ -233,13 +234,20 @@ setup_toolchain() {
|
||||
# gold flag
|
||||
if flag_enabled "gold" "$GOLD_SUPPORT" "only-disable"; then
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_GOLD"
|
||||
have_gold="yes"
|
||||
fi
|
||||
|
||||
# compiler optimization, descending priority: speed, size, default
|
||||
if [ "${BUILD_WITH_DEBUG}" = "yes" ]; then
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_DEBUG"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_DEBUG"
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_DEBUG"
|
||||
if [ "${SPLIT_DEBUG_INFO}" = "yes" -a "${have_gold}" = "yes" ]; then
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_DEBUG_SPLIT"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_DEBUG_SPLIT"
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_DEBUG_SPLIT"
|
||||
else
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_DEBUG"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_DEBUG"
|
||||
TARGET_LDFLAGS+=" $LDFLAGS_OPTIM_DEBUG"
|
||||
fi
|
||||
elif flag_enabled "speed" "no"; then
|
||||
TARGET_CFLAGS+=" $CFLAGS_OPTIM_SPEED"
|
||||
TARGET_CXXFLAGS+=" $CXXFLAGS_OPTIM_SPEED"
|
||||
|
||||
@@ -43,6 +43,10 @@ CXXFLAGS_OPTIM_SIZE="$CFLAGS_OPTIM_SIZE"
|
||||
CFLAGS_OPTIM_DEBUG="-ggdb -Os"
|
||||
CXXFLAGS_OPTIM_DEBUG="$CFLAGS_OPTIM_DEBUG"
|
||||
LDFLAGS_OPTIM_DEBUG="-ggdb"
|
||||
# split debug settings (requires gold)
|
||||
CFLAGS_OPTIM_DEBUG_SPLIT="-gsplit-dwarf -Os"
|
||||
CXXFLAGS_OPTIM_DEBUG_SPLIT="$CFLAGS_OPTIM_DEBUG_SPLIT"
|
||||
LDFLAGS_OPTIM_DEBUG_SPLIT="-Wl,--gdb-index"
|
||||
|
||||
# position-independent code
|
||||
CFLAGS_OPTIM_PIC="-fPIC -DPIC"
|
||||
|
||||
Reference in New Issue
Block a user