openjdk: fix CFLAGS/CXXFLAGS modification

Modify CFLAGS and CXXFLAGS inside the do_build() function,
because otherwise it won't work and the build fails.
This commit is contained in:
Jürgen Buchmüller 2015-12-05 17:45:52 +01:00
parent a963fbf8f6
commit 9cd9108a64

View file

@ -12,7 +12,7 @@ _openjdk_version="openjdk-1.8.0_${_jdk_update}"
# Template file for 'openjdk'
pkgname=openjdk
version=${_java_ver}u${_jdk_update}
revision=2
revision=3
nocross=yes
wrksrc=jdk8u-jdk8u${_jdk_update}-b${_jdk_build}/
build_style=gnu-configure
@ -66,10 +66,6 @@ checksum="878659af51338538c595e6f7f6da5c5ef45698fef7d8d87b18a5b58d42cdfcaf
# Build is still parallel, but don't use -jN.
disable_parallel_build=yes
# -D_FORTIFY_SOURCE=2 doesn't work with CXX_O_FLAG_NONE="-O0"
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
build_options="oracle_bootstrap"
build_options_default="oracle_bootstrap"
desc_option_oracle_bootstrap="Bootstrap using Oracle JDK"
@ -131,6 +127,13 @@ alternatives="
jdk:/usr/bin/xjc:/usr/lib/jvm/openjdk/bin/xjc
"
do_build() {
# -D_FORTIFY_SOURCE=2 doesn't work with CXX_O_FLAG_NONE="-O0"
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
make ${makejobs} ${make_build_args}
}
post_extract() {
chmod +x configure
for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn; do