Skip to content

Commit

Permalink
Let's be a bit more discriminate.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Mar 4, 2024
1 parent a090c6f commit 33e6816
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions arm-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build_one \
--sample-name=arm-none-eabi \
--multilib-list=rmprofile \
--libc=newlib \
--binutils-plugins \
--extra-newlib-nano \
--no-cross-gdb-python \
${extra_args:-} \
Expand Down
1 change: 1 addition & 0 deletions avr-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build_one_help "$@"

build_one \
--sample-name=avr \
--binutils-plugins \
--no-cross-gdb-python \
${extra_args:-} \
"$@"
12 changes: 11 additions & 1 deletion common.bashinc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ function build_one_args() {
--extra-picolibc -- Builds picolibc in addition to the usual C library (optional)
--static-toolchain -- Builds the toolchain such that it's statically linked (optional)
--multilib-list=<value> -- Overrides the list of multilib targets generated. Sets \$CT_CC_GCC_MULTILIB_LIST. (optional)
--binutils-plugins -- Builds the toolchain with binutils plugins enabled (optional) -- cannot be used with \`--static-toolchain\`
__EOT__
}

Expand Down Expand Up @@ -200,7 +201,6 @@ function build_one() {
-e 's/^.*CT_DEBUG_GDB.*$/CT_DEBUG_GDB=y/' \
-e 's@^.*CT_LOCAL_TARBALLS_DIR.*$@CT_LOCAL_TARBALLS_DIR="'"$script_dir/tarballs"'"@' \
.config
echo "CT_BINUTILS_PLUGINS=y" >> .config
echo 'CT_CC_GCC_EXTRA_CONFIG_ARRAY="--enable-version-specific-runtime-libs"' >> .config
ct-ng olddefconfig

Expand All @@ -213,6 +213,16 @@ function build_one() {
echo CT_LINUX_V_4_19=y >>.config
ct-ng olddefconfig

if [[ ! -z "${binutils_plugins:-}" ]] && [[ ! -z "${static_toolchain:-}" ]]; then
echo "Cannot use \`--binutils-plugins\` and \`--static-toolchain\` together." >&2
exit 1
fi

if [[ ! -z "${binutils_plugins:-}" ]]; then
echo "CT_BINUTILS_PLUGINS=y" >> .config
ct-ng olddefconfig
fi

if [[ ! -z "${static_toolchain:-}" ]]; then
${SED} -i \
-e 's/^.*CT_STATIC_TOOLCHAIN.*$/CT_STATIC_TOOLCHAIN=y/' \
Expand Down
1 change: 1 addition & 0 deletions riscv32-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build_one_help "$@"
build_one \
--sample-name=riscv32-picolibc-elf \
--vendor-name=unknown \
--binutils-plugins \
--no-cross-gdb-python \
${extra_args:-} \
"$@"

0 comments on commit 33e6816

Please sign in to comment.