Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.

use PIC/PIE on linux-x86-64#464

Merged
mxcl merged 1 commit into
mainfrom
default-PIC
Mar 5, 2023
Merged

use PIC/PIE on linux-x86-64#464
mxcl merged 1 commit into
mainfrom
default-PIC

Conversation

@jhheider
Copy link
Copy Markdown
Contributor

@jhheider jhheider commented Mar 4, 2023

Ubuntu turns on PIC/PIE by default (since 16.04). ChatGPT thinks this might be the fix. I can affirm that it helps a number of segfault issues for different packages.

Testing, you know, needed.

PR/Issuess where this fix was the correct fix:

@jhheider jhheider requested a review from jonchang March 4, 2023 10:52
@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented Mar 4, 2023

  • The runtime environment for linux/x86-64 was added.
  • LDFLAGS, CFLAGS and CXXFLAGS were set to -pie, -fPIC and -fPIC respectively in the new env section of the package file.

@jhheider
Copy link
Copy Markdown
Contributor Author

jhheider commented Mar 4, 2023

Hm. Looks like an temporary apt install of binutils might have been interfering with some builds. That could be contributing. Will monitor.

@jhheider
Copy link
Copy Markdown
Contributor Author

jhheider commented Mar 5, 2023

using https://github.com/teaxyz/pantry.extra/actions/runs/4320084201 as my litmus test. this PR might be a good idea regardless, but let's see if its necessary.

@jonchang
Copy link
Copy Markdown
Contributor

jonchang commented Mar 5, 2023

I think flipping this switch on by default would be good. Let's give it a shot.

@jhheider
Copy link
Copy Markdown
Contributor Author

jhheider commented Mar 5, 2023

It's what Ubuntu did. That's a pretty good argument by itself.

@jhheider jhheider requested a review from mxcl March 5, 2023 02:12
@jhheider
Copy link
Copy Markdown
Contributor Author

jhheider commented Mar 5, 2023

Yep. Confirmed fix here: pkgxdev/pantry#432

@mxcl
Copy link
Copy Markdown
Contributor

mxcl commented Mar 5, 2023

Good sleuthing. I think doing it like superenv on brew is better longer term, but we’ll get to that.

@mxcl mxcl merged commit 683bc4a into main Mar 5, 2023
@mxcl mxcl deleted the default-PIC branch March 5, 2023 12:56
@mxcl
Copy link
Copy Markdown
Contributor

mxcl commented Mar 5, 2023

A comment would have helped future generations!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants