Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration updates to compile with GCC 8 #2803

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ci/build-all-defconfigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,21 @@ for i in ${DEFCONFIGS[@]}; do
op-build O=$O $i
./buildroot/utils/config --file $O/.config --set-val BR2_CCACHE y
./buildroot/utils/config --file $O/.config --set-str BR2_CCACHE_DIR $CCACHE_DIR
if [ -d "$SDK_DIR" ]; then
if [ -d "$SDK_DIR/p8/host" ] || [ -d "$SDK_DIR/p9/host" ]; then
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL y
./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC y
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_CXX y
# FIXME: How do we work this out programatically?
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_6 y

IS_P8=$(./buildroot/utils/config --file $O/.config --state BR2_OPENPOWER_POWER8)

# FIXME: How do we work this out programatically for each individual config?
if [[ ! -n ${IS_P8} ]]; then
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_8 y
./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR/p9/host
else
./buildroot/utils/config --file $O/.config --set-val BR2_TOOLCHAIN_EXTERNAL_GCC_6 y
./buildroot/utils/config --file $O/.config --set-str BR2_TOOLCHAIN_EXTERNAL_PATH $SDK_DIR/p8/host
fi

KERNEL_VER=$(./buildroot/utils/config --file $O/.config --state BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE)
echo "KERNEL_VER " $KERNEL_VER
Expand Down
15 changes: 10 additions & 5 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,17 @@ EOF
if [ -d "$SDK_CACHE" ]; then
SDK_DIR=$SDK_CACHE/$(toolchain_hash)-$distro
if [ ! -d "$SDK_DIR" ]; then
chmod +x ci/build-sdk.sh
run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro witherspoon_defconfig"
mv output-$distro-witherspoon_defconfig $SDK_DIR
$SDK_DIR/host/relocate-sdk.sh
chmod +x ci/build-sdk.sh
mkdir $SDK_DIR/p8/
mkdir $SDK_DIR/p9/
run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro habanero_defconfig"
run_docker openpower/op-build-$distro "./ci/build-sdk.sh $distro witherspoon_defconfig"
mv output-$distro-habanero_defconfig $SDK_DIR/p8/
mv output-$distro-witherspoon_defconfig $SDK_DIR/p9/
$SDK_DIR/p8/host/relocate-sdk.sh
$SDK_DIR/p9/host/relocate-sdk.sh
fi
sdk_args="-s $SDK_DIR/host"
sdk_args="-s $SDK_DIR"
else
sdk_args=""
fi
Expand Down
2 changes: 1 addition & 1 deletion openpower/configs/p9dsu_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_GCC_VERSION_6_X=y
BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
Expand Down
2 changes: 1 addition & 1 deletion openpower/configs/romulus_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_GCC_VERSION_6_X=y
BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
Expand Down
2 changes: 1 addition & 1 deletion openpower/configs/witherspoon_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_GCC_VERSION_6_X=y
BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
Expand Down
2 changes: 1 addition & 1 deletion openpower/configs/zaius_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BR2_powerpc64le=y
BR2_powerpc_power8=y
BR2_BINUTILS_EXTRA_CONFIG_OPTIONS="--enable-targets=powerpc64-linux"
BR2_GCC_VERSION_6_X=y
BR2_GCC_VERSION_8_X=y
BR2_EXTRA_GCC_CONFIG_OPTIONS="--enable-targets=powerpc64-linux --disable-libsanitizer"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="skiroot"
Expand Down
13 changes: 13 additions & 0 deletions openpower/linux/0003-space-saving-compile-options.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 46b6081..efa2361 100644
--- a/Makefile
+++ b/Makefile
@@ -444,7 +444,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration -Werror=implicit-int \
-Wno-format-security \
- -std=gnu89
+ -std=gnu89 -fno-asynchronous-unwind-tables -g0 -fno-shrink-wrap
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=