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

-rpath wont work when targeting Mac OS X 10.3 on 10.5 #21367

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

sevan
Copy link
Contributor

@sevan sevan commented Aug 12, 2023

Fixes build on Leopard 10.5 where the use of -rpath fails with
ld: -rpath can only be used when targetting Mac OS X 10.5 or later.
Attempting to set MACOSX_DEPLOYMENT_TARGET is ignored.
We leave it set for 10.4 & prior as the linker would default to a deployment target of 10.1 on powerpc & 10.4 on intel builds and there's no issue with this on 10.4 currently.

@sevan sevan changed the title -rpath wont work when targetting 10.3 on 10.5 -rpath wont work when targeting 10.3 on 10.5 Aug 12, 2023
Fixes build on Leopard 10.5 where the use of -rpath fails with
ld: -rpath can only be used when targeting Mac OS X 10.5 or later.
Attempting to set MACOSX_DEPLOYMENT_TARGET is ignored.
@sevan sevan changed the title -rpath wont work when targeting 10.3 on 10.5 -rpath wont work when targeting Mac OS X 10.3 on 10.5 Aug 12, 2023
@tonycoz
Copy link
Contributor

tonycoz commented Sep 6, 2023

The documentation for MACOSX_DEPLOYMENT_TARGET's effects are unfortunately poor :(

I couldn't find anything where perl adds -rpath on darwin based on MACOSX_DEPLOYMENT_TARGET*, so I assume the MACOSX_DEPLOYMENT_TARGET setting is making the toolchain use -rpath internally, causing the failure (let me know if I missed it).

* EU::MM uses it based on $Config{osvers}, but not MACOSX_DEPLOYMENT_TARGET

@sevan
Copy link
Contributor Author

sevan commented Sep 6, 2023

The documentation for MACOSX_DEPLOYMENT_TARGET's effects are unfortunately poor :(

I couldn't find anything where perl adds -rpath on darwin based on MACOSX_DEPLOYMENT_TARGET*, so I assume the MACOSX_DEPLOYMENT_TARGET setting is making the toolchain use -rpath internally, causing the failure (let me know if I missed it).

The compiler toolchain will default to using -rpath on 10.5 but having MACOSX_DEPLOYMENT_TARGET set to 10.3 prevents it from being used, so we raise MACOSX_DEPLOYMENT_TARGET in Perl since that's where the 10.3 setting originates from, rather than attempting to adapt the things so -rpath is not used (I haven't attempted it & unsure if it's possible).

@tonycoz tonycoz merged commit ec4040b into Perl:blead Sep 11, 2023
27 checks passed
@sevan sevan deleted the darwin9-buildfix branch September 11, 2023 07:57
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.

3 participants