diff --git a/installers/linux/al2/spec/build.gradle b/installers/linux/al2/spec/build.gradle index 774310e9dd..dc924bc3e6 100644 --- a/installers/linux/al2/spec/build.gradle +++ b/installers/linux/al2/spec/build.gradle @@ -46,7 +46,7 @@ task inflateRpmSpec(type: Copy) { filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ experimental_feature: project.findProperty("corretto.experimental_feature") ?: "%{nil}" ]) filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ additional_configure_options: project.findProperty("corretto.additional_configure_options") ?: "%{nil}"]) filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ zlib_option: project.findProperty("corretto.zlib_option") ?: "system"]) - filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ use_gcc_ver: project.findProperty("corretto.use_gcc_ver") ?: ""]) + filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ use_gcc_ver: project.findProperty("corretto.use_gcc_ver") ?: "%{nil}"]) } into buildRoot } diff --git a/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template b/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template index 97c50c52c1..841c6ce155 100644 --- a/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template +++ b/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template @@ -38,6 +38,10 @@ %if 0%{?additional_configure_options:1} == 1 && "%{additional_configure_options}" == "%{nil}" %undefine additional_configure_options %endif + +%if 0%{?use_gcc_ver:1} == 1 && "%{use_gcc_ver}" == "%{nil}" +%undefine use_gcc_ver +%endif # Higher numbers win for the alternatives program. # AL2 has chosen java-1.7.0-openjdk to be default (priority 17000) # with java-1.8.0-openjdk as second (priority 1800)