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

build: default to ppc64 on AIX #9645

Merged
merged 1 commit into from
Nov 21, 2016
Merged

Conversation

gibfahn
Copy link
Member

@gibfahn gibfahn commented Nov 16, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build

Description of change

The ./configure python script searches gcc -dM -E - for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the flag unless you run gcc -maix64 -dM -E -.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

cc/ @edelsohn (who confirmed that __PPC64__ wasn't available below gcc v6)
cc/ @nodejs/platform-aix

@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Nov 16, 2016
@gibfahn
Copy link
Member Author

gibfahn commented Nov 16, 2016

@bnoordhuis Do you know how make/gmake decides which C compiler to use?

./configure on AIX correctly chooses gcc for CC and g++ for CXX, but when I run gmake it uses cc and g++.

I know you can use

export CC=`which gcc`
export CXX=`which g++`

but if there's an easy way to set defaults then that'd be useful.

@edelsohn
Copy link

edelsohn commented Nov 16, 2016

AIX user space defaults to 32 bit. IBM XLC compiler on AIX defaults to 32 bit. For compatibility, 32 bit remains the default on AIX for GCC.

GCC had been defining PPC on AIX. In 64 bit mode (-maix64), GCC added definitions of PPC64 and powerpc64 for compatibility with Linux on Power starting with release GCC 6.

@mscdex mscdex added aix Issues and PRs related to the AIX platform. ppc Issues and PRs related to the Power architecture. labels Nov 16, 2016
@jbergstroem
Copy link
Member

@jbergstroem
Copy link
Member

@gibfahn isn't cc symlinked to gcc on aix?

@gibfahn
Copy link
Member Author

gibfahn commented Nov 17, 2016

@jbergstroem Yep, that configure step works fine, however those variables don't seem to be passed on to the make command.

I don't think cc is symlinked to gcc, otherwise building without setting $CC and $CXX wouldn't fail 😁

I'm pretty sure we're specifying $CC and $CXX in the build jobs.

@jbergstroem
Copy link
Member

Hm. Might be a Gyp issue

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM the change proposed. Looks the like discussion is around other ways we could make the experience for people compiling it themselves better.

@gibfahn
Copy link
Member Author

gibfahn commented Nov 18, 2016

The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: nodejs#9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@gibfahn gibfahn merged commit 515b1f3 into nodejs:master Nov 21, 2016
addaleax pushed a commit that referenced this pull request Nov 22, 2016
The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: #9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@gibfahn gibfahn deleted the pr-configure-aix branch December 16, 2016 11:10
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: #9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: #9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: #9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
The ./configure python script searches `gcc -dM -E -` for the ARCH
flags. On AIX, gcc builds in 32 bit mode by default prior to gcc v6, so
you don't get the __PPC64__ flag unless you run `gcc -maix64 -dM -E -`.

We don't support ppc 32 bit for any OS, so always use ppc64 as the
host_arch.

PR-URL: #9645

Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This was referenced Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aix Issues and PRs related to the AIX platform. build Issues and PRs related to build files or the CI. ppc Issues and PRs related to the Power architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants