Skip to content

Commit

Permalink
(PA-6383) build augeas and libedit with shared compiler settings
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Apr 24, 2024
1 parent cfa0363 commit fb908b9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 9 additions & 1 deletion configs/components/augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,15 @@
end
end

if platform.name =~ /sles-15|el-8|debian-10/ || platform.is_fedora?
# conditional taken from projects/_shared-compiler-settings
# TODO: refactor condition
if ((platform.is_sles? && platform.os_version.to_i >= 15) ||
(platform.is_el? && platform.os_version.to_i >= 8) ||
platform.is_debian? ||
(platform.is_ubuntu? && platform.os_version.to_i >= 20) ||
(platform.is_amazon? && platform.os_version.to_i >= 2023) ||
platform.is_fedora?
)
pkg.environment 'CFLAGS', settings[:cflags]
pkg.environment 'CPPFLAGS', settings[:cppflags]
pkg.environment "LDFLAGS", settings[:ldflags]
Expand Down
5 changes: 2 additions & 3 deletions configs/components/libedit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
elsif platform.is_aix?
pkg.environment "CC", "/opt/pl-build-tools/bin/gcc"
pkg.environment "LDFLAGS", settings[:ldflags]
end

if platform.is_macos?
else
pkg.environment "LDFLAGS", settings[:ldflags]
pkg.environment "CFLAGS", settings[:cflags]
end

Expand Down

0 comments on commit fb908b9

Please sign in to comment.