Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Filter out problematic vars from the ct-ng sample
Browse files Browse the repository at this point in the history
  • Loading branch information
mingwandroid committed Jun 3, 2017
1 parent 2efb442 commit e4452c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cross-compilers/compilers_generic/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if [[ ! -n $(find ${SRC_DIR}/gcc_built -iname ${cpu_arch}-${vendor}-*-gfortran)
source ${RECIPE_DIR}/write_ctng_config

yes "" | ct-ng ${ctng_sample}
write_ctng_config_before "${PWD}"/.config
write_ctng_config_before .config
# Apply some adjustments for conda.
sed -i.bak "s|# CT_DISABLE_MULTILIB_LIB_OSDIRNAMES is not set|CT_DISABLE_MULTILIB_LIB_OSDIRNAMES=y|g" .config
sed -i.bak "s|CT_CC_GCC_USE_LTO=n|CT_CC_GCC_USE_LTO=y|g" .config
Expand All @@ -71,8 +71,12 @@ if [[ ! -n $(find ${SRC_DIR}/gcc_built -iname ${cpu_arch}-${vendor}-*-gfortran)
fi
# Now ensure any changes we made above pull in other requirements by running oldconfig.
yes "" | ct-ng oldconfig
# Now filter out 'things that cause problems'. For example, depending on the base sample, you can end up with
# two different glibc versions in-play.
sed -i.bak '/CT_LIBC/d' .config
sed -i.bak '/CT_LIBC_GLIBC/d' .config
# And undo any damage to version numbers => the seds above could be moved into this too probably.
write_ctng_config_after "${PWD}"/.config
write_ctng_config_after .config
if cat .config | grep "CT_GDB_NATIVE=y"; then
if ! cat .config | grep "CT_EXPAT_TARGET=y"; then
echo "ERROR: CT_GDB_NATIVE=y but CT_EXPAT_TARGET!=y"
Expand Down
4 changes: 4 additions & 0 deletions cross-compilers/compilers_generic/write_ctng_config
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ function write_ctng_package_versions() {
"${_extras[@]}"; do
write_config_var "${_dst}" "${_VAR_CT_VAR}"
done
# Add this back here because build.sh filters out LIBC_GLIBC to prevent conflicts.
if [[ ${libc} == gnu ]]; then
echo "CT_LIBC_GLIBC_FORCE_UNWIND=y" >> "${_dst}"
fi
}

function write_ctng_config_before() {
Expand Down

0 comments on commit e4452c6

Please sign in to comment.