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

(PA-6896) Enable pie on RHEL 9 and up #906

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skyamgarp
Copy link
Contributor

(PA-6896) remove the shared flag

@skyamgarp skyamgarp requested review from a team as code owners August 27, 2024 17:38
@skyamgarp skyamgarp marked this pull request as draft August 27, 2024 17:38
(PA-6896) remove the shared flag
@@ -21,4 +20,9 @@
proj.setting(:cppflags, "-I#{proj.includedir} -D_FORTIFY_SOURCE=2")
proj.setting(:cflags, '-fstack-protector-strong -fno-plt -O2')
proj.setting(:ldflags, "-L#{proj.libdir} -Wl,-rpath=#{proj.libdir},-z,relro,-z,now")
elsif(platform.is_el? && platform.os_version.to_i >= 8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elsif(platform.is_el? && platform.os_version.to_i >= 8)
elsif platform.is_el? && platform.os_version.to_i >= 8

@@ -94,7 +94,7 @@
special_flags = " --prefix=#{ruby_dir} --with-opt-dir=#{settings[:prefix]} "

if settings[:supports_pie]
special_flags += " CFLAGS='#{settings[:cflags]}' LDFLAGS='#{settings[:ldflags]}' CPPFLAGS='#{settings[:cppflags]}' "
special_flags += " CFLAGS='-fPIC -fstack-protector-strong -fno-plt -O2' LDFLAGS='#{settings[:ldflags]}' CPPFLAGS='-fPIE #{settings[:cppflags]}' "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe why you're removing :cflags from here? What problem is being solved aside from "pie doesn't work"? Does this mean none of the cflags defined in the project are being passed to the configure command?

@@ -12,7 +12,6 @@
# are too old to support these flags.

if((platform.is_sles? && platform.os_version.to_i >= 15) ||
(platform.is_el? && platform.os_version.to_i == 8 && platform.architecture !~ /ppc64/) ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean RHEL 9 ppc now supports pie? If so, the commit message should mention the change in behavior.

@joshcooper
Copy link
Contributor

Oh sorry I just noticed this is a draft

@joshcooper joshcooper linked an issue Sep 6, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIE is not enabled on RHEL9 or Debian 11 and up
2 participants