jjyoon1 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Link options need to be updated for AIX #495

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
<B>What steps will reproduce the problem?</B>

1. Check out V8 for AIX  (errors below are shown when compiling Node which 
includes V8 as a dependency but the same issue occurs if you compile master for 
V8)

2. Compile targeting 64 bit 

<B>What is the expected output</B> -> Expected out is successful compilation.

<B>What do you see instead</B> -> Many failures like these:

/src/ic/ppc/stub-cache-ppc.o 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/gen/debug-support.o
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/accessors.o is 
not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/allocation.o is 
not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/allocation-site-s
copes.o is not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/allocation-tracke
r.o is not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/api.o is not 
valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/gcc48/os/aix/node/out/Release/obj.host/v8_base/deps/v8/src/api-natives.o is 
not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
ar: 0707-126 
/scratch/jenkins-local/workspace/convergance-build-aix/arch/ppc64/build/build/gc
c48/g

<B>What version of the product are you using</B>
master

<B>On what operating system</B>
AIX 6.1

<B>Please provide any additional information below.</B>

Changing the following lines in the file resolves the issue:

  build/gyp/pylib/gyp/generator/make.py

  LINK_COMMANDS_AIX = """\
  quiet_cmd_alink = AR($(TOOLSET)) $@
- cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
+ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -Xany crs $@ $(filter %.o,$^)

  quiet_cmd_alink_thin = AR($(TOOLSET)) $@
- cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
+ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -Xany crsT $@ $(filter %.o,$^)

  quiet_cmd_link = LINK($(TOOLSET)) $@
  cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)

There is a separate issue for the cmd_solink and cmd_solink_modules lines but 
I'll open a separate issue for those as I believe the recreate instructions 
would be different 

Now that the level of V8 in Node includes the changes for PPC we are working to 
get Node compiling in the community builds on AIX (plinux is already working) 
and this change is required for it to compile on 64 bit 

Original issue reported on code.google.com by michael_...@ca.ibm.com on 21 Aug 2015 at 5:10