From c47a9e2e53422b1883a1c8311259cd092179b27f Mon Sep 17 00:00:00 2001 From: Christopher Thorn Date: Fri, 30 Jun 2023 10:54:17 -0700 Subject: [PATCH] (PA-4872) OpenSSL 3 work for Solaris-11-x86-64 This PR continues Aria's work for getting Solaris 11 x86-64 building openssl 3. This uses OpenCSW's GCC to build openssl. --- configs/components/libffi.rb | 8 -------- configs/components/openssl-3.0.rb | 2 +- configs/platforms/solaris-11-i386.rb | 1 - configs/projects/_shared-agent-settings.rb | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/configs/components/libffi.rb b/configs/components/libffi.rb index 0604a7363..755475062 100644 --- a/configs/components/libffi.rb +++ b/configs/components/libffi.rb @@ -16,14 +16,6 @@ pkg.environment "LDFLAGS", settings[:ldflags] elsif platform.is_solaris? pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:#{settings[:bindir]}" - # use pl-build-tools for agent-runtime-7.x and /opt/csw for agent-runtime-main project - # if settings[:runtime_project] =~ /7.x/ # try using pl-build-tools to see if that's what the issue is - # pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:#{settings[:bindir]}" - # else - # pkg.environment "PATH", "/opt/csw/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:#{settings[:bindir]}" - # pkg.environment "LD", "/opt/csw/bin/gld" - # pkg.environment "AR", "/opt/csw/bin/gar" - # end pkg.environment "CFLAGS", "#{settings[:cflags]} -std=c99" pkg.environment "LDFLAGS", settings[:ldflags] pkg.environment 'MAKE', 'gmake' diff --git a/configs/components/openssl-3.0.rb b/configs/components/openssl-3.0.rb index 46ddd0219..fb732ac9c 100644 --- a/configs/components/openssl-3.0.rb +++ b/configs/components/openssl-3.0.rb @@ -61,7 +61,7 @@ target = 'aix-gcc' elsif platform.is_solaris? pkg.environment 'PATH', '/opt/csw/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin' - pkg.environment 'CC', "/opt/csw/bin/#{settings[:platform_triple]}-gcc" + pkg.environment 'CC', "/opt/csw/bin/gcc" cflags = "#{settings[:cflags]} -fPIC" ldflags = "-R/opt/csw/#{settings[:platform_triple]}/lib -Wl,-rpath=#{settings[:libdir]} -L/opt/csw/#{settings[:platform_triple]}/lib" diff --git a/configs/platforms/solaris-11-i386.rb b/configs/platforms/solaris-11-i386.rb index a4962effb..ffb028168 100644 --- a/configs/platforms/solaris-11-i386.rb +++ b/configs/platforms/solaris-11-i386.rb @@ -42,7 +42,6 @@ echo "mirror=https://artifactory.delivery.puppetlabs.net/artifactory/generic__remote_opencsw_mirror/testing" > /var/tmp/vanagon-pkgutil.conf; pkgadd -n -a /var/tmp/vanagon-noask -d http://get.opencsw.org/now all /opt/csw/bin/pkgutil --config=/var/tmp/vanagon-pkgutil.conf -y -i libffi_dev autoconf gcc4core || exit 1; - ntpdate pool.ntp.org] plat.output_dir File.join("solaris", "11", "PC1") end diff --git a/configs/projects/_shared-agent-settings.rb b/configs/projects/_shared-agent-settings.rb index 0cb7c71ea..23537215b 100644 --- a/configs/projects/_shared-agent-settings.rb +++ b/configs/projects/_shared-agent-settings.rb @@ -156,7 +156,7 @@ proj.setting(:ldflags, "-L#{proj.libdir} -Wl,-rpath=#{proj.libdir},-z,relro,-z,now") end -if ruby_version_x == "3" +if ruby_version_x == "3" proj.setting(:openssl_version, '3.0') elsif platform.name =~ /^redhatfips-/ proj.setting(:openssl_version, '1.1.1-fips')