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

Add AIX support in Makefile #2747

Merged
merged 2 commits into from
Oct 1, 2021
Merged

Add AIX support in Makefile #2747

merged 2 commits into from
Oct 1, 2021

Conversation

Helflym
Copy link
Contributor

@Helflym Helflym commented Aug 13, 2021

This PR adds two patches for AIX.
One for adding the general support of AIX inside Makefile.
One to remove the test dealing with /dev/full for AIX.

Clément Chigot added 2 commits August 13, 2021 10:25
For lib, AIX linker doesn't allow --soname.
@facebook-github-bot
Copy link

Hi @Helflym!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@@ -212,7 +212,11 @@ ifeq ($(UNAME), Darwin)
SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)
SONAME_FLAGS = -install_name $(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER)
else
SONAME_FLAGS = -Wl,-soname=libzstd.$(SHARED_EXT).$(LIBVER_MAJOR)
ifeq ($(UNAME), AIX)
SONAME_FLAGS =
Copy link
Contributor

Choose a reason for hiding this comment

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

That part feels weird.
What happens to dynamic libraries in the context of AIX ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AIX linker doesn't simply understand -soname flag. GCC when calling the linker will pass the right arguments as long as "-shared" is provided. The "-o" flag is enough to have the correct soname.

@Cyan4973
Copy link
Contributor

Cyan4973 commented Aug 16, 2021

Thanks for this proposed PR.
It looks good to me.

Note though that the CLA signing stage is mandatory before proceeding to merge the PR.

@@ -374,7 +378,7 @@ clean:
#-----------------------------------------------------------------------------
# make install is validated only for below listed environments
#-----------------------------------------------------------------------------
ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku))
ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX))
Copy link
Contributor

Choose a reason for hiding this comment

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

tangentially related :
It seems we have the same list of uname identifiers in 3 different places (for the purpose of controlling make install compatibility).
We could probably consolidate this list in one place and distribute it, making its maintenance and evolution a bit easier.
cc @felixhandte .

@Helflym
Copy link
Contributor Author

Helflym commented Sep 20, 2021

Note though that the CLA signing stage is mandatory before proceeding to merge the PR.

Just to give an update, I'm still waiting for the CLA to be signed by my company.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@Cyan4973 Cyan4973 merged commit 7868f38 into facebook:dev Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants