the current 'gcc' setup for assembly files doesn't work
using gcc 2.95.2 (cement:/builds/local/bin) gcc -x assembler-with-cpp -D_ASM -mips3 -o IRIX6.5_gcc_PTH_DBG.OBJ/os_Irix.o -g -D_PR_HAVE_SGI_PRDA_PROCMASK -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_POINTER -Wall -Wno-format -DSVR4 -DIRIX -D_SGI_MP_SOURCE -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -DXP_UNIX -DDEBUG -UNDEBUG -DDEBUG_jdunn -D_NSPR_BUILD_ -I/builds/jdunn/5.0/mozilla/dist/include -I../../../../pr/include -I../../../../pr/include/private -c os_Irix.s fails: workaround is preprocess: gcc -E -x assembler-with-cpp -D_ASM -mips3 -g -o os_Irix.i -D_PR_HAVE_SGI_PRDA_PROCMASK -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_POINTER -Wall -Wno-format -DSVR4 -DIRIX -D_SGI_MP_SOURCE -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -DXP_UNIX -DDEBUG -UNDEBUG -DDEBUG_jdunn -D_NSPR_BUILD_ -I/builds/jdunn/5.0/mozilla/dist/include -I../../../../pr/include -I../../../../pr/include/private -c os_Irix.s and then compile the pre-processed file gcc -x assembler-with-cpp -D_ASM -mips3 -g -o IRIX6.5_gcc_PTH_DBG.OBJ/os_Irix.o -c os_IRIX.i
Status: NEW → ASSIGNED
QA Contact: asadotzler → jdunn
This bug has not been touched for more than nine months. In most cases, that means it has "slipped through the net". Please could the owner take a moment to add a comment to the bug with current status, and/or close it. Thank you :-) Gerv
i have no idea... it was assigned to me, and I didn't have any good place to dump it... I know that Richard Hess is busy working on the irix port but I don't think he is using gcc... All I can do is resolve it as WON'T FIX... cause I can't fix it.
reassigning to wtc & nspr
Assignee: jdunn → wtc
Status: ASSIGNED → NEW
Component: Browser-General → NSPR
Product: Browser → NSPR
QA Contact: jdunn
Target Milestone: --- → Future
Version: other → 4.0
I have tried to get a gcc build on IRIX, and came across this problem. Turning on debug (-v) shows gcc is using gcc's cpp, and then as is using SGI's cpp, and the two dont agree on syntax. % gcc -v -x assembler-with-cpp -D_ASM -mips2 - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/dist/include/nspr - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include /private -o os_Irix.i - c /projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/src/md /unix/os_Irix.s Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/specs gcc version 2.95.2 19991024 (release) /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/cpp -lang-asm -v - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/dist/include/nspr - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include /private -$ -Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 - D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix__ -D__mips__ - D__sgi__ -D__host_mips__ -D__MIPSEB__ -D_MIPSEB -D__SYSTYPE_SVR4__ -D_LONGLONG - D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix -D__mips -D__sgi -D__host_mips - D__MIPSEB -D__SYSTYPE_SVR4 -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine (sgi) -D__ASSEMBLER__ -D__CHAR_UNSIGNED__ -traditional -D__LANGUAGE_ASSEMBLY - D_LANGUAGE_ASSEMBLY -DLANGUAGE_ASSEMBLY -D__SIZE_TYPE__=unsigned int - D__PTRDIFF_TYPE__=int -D__EXTENSIONS__ -D_SGI_SOURCE -D_MIPS_FPSET=32 - D_MIPS_ISA=_MIPS_ISA_MIPS2 -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 - D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D__mips64 - D_ASM /projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/sr c/md/unix/os_Irix.s /var/tmp/ccVyS6na.s GNU CPP version 2.95.2 19991024 (release) [AL 1.1, MM 40] SGI running IRIX 6.x #include "..." search starts here: #include <...> search starts here: /projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/dist/include/nspr /projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include /projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include /private /usr/local/include /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/../../../../mips-sgi- irix6.2/include /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/include /usr/include End of search list. The following default directories have been omitted from the search path: /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/include/g++ End of omitted list. /usr/bin/as -mips2 -g0 -show -G 0 -w -n32 -o os_Irix.i /var/tmp/ccVyS6na.s /usr/bin/../../usr/lib32/cmplrs/as -DEFAULT:abi=n32:isa=mips3 -mips2 -g0 -show - G 0 -w -n32 -o os_Irix.i /var/tmp/ccVyS6na.s as WARNING: os_Irix.i os_Irix.i will overwrite a file that has a source-file suffix as WARNING: ABI specification -n32 conflicts with ISA specification -mips2: defaulting ISA to mips3 /usr/lib32/cmplrs/cpp -Dmips -DMIPSEB -D_MIPSEB -D_PIC -D__DSO__ - D_LANGUAGE_ASSEMBLY -DLANGUAGE_ASSEMBLY -Xdo_linesplice -dollar -Dunix -Dsgi - Dhost_mips -D_SGI_SOURCE -D_LONGLONG -D_SVR4_SOURCE -D__sgi -D__host_mips - Amachine(mips) -D_SYSTYPE_SVR4 -D__unix -Asystem(unix) -D_COMPILER_VERSION=730 - D__mips=3 -D_MIPS_ISA=3 -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_FPSET=32 - D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D_SIZE_INT=32 - D_SIZE_LONG=32 -D_SIZE_PTR=32 -I/usr/include /var/tmp/ccVyS6na.s > /tmp/ctmi.AAAa0iX4x "/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/src/md/ unix/os_Irix.s", line 29: error(1014): extra text after expected end of preprocessing directive # 1 "/usr/include/sys/asm.h" 1 3 ^ "/usr/include/sys/asm.h", line 20: error(1014): extra text after expected end of preprocessing directive # 1 "/usr/include/sgidefs.h" 1 3 ^ "/usr/include/sgidefs.h", line 253: error(1014): extra text after expected end of preprocessing directive # 20 "/usr/include/sys/asm.h" 2 3 ^ "/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/src/md/ unix/os_Irix.s", line 30: error(1014): extra text after expected end of preprocessing directive # 1 "/usr/include/sys/regdef.h" 1 3 ^ 4 errors detected in the compilation of "/var/tmp/ccVyS6na.s". as ERROR: /usr/lib32/cmplrs/cpp returned non-zero status 2 I tried the workaround of separating pre-processing and assembling, and this produced the same problem. I had to remove the offending '3's. And then all is well and nspr is build (not tested).
The two solutions attempted to fix this so far as 1) use /usr/bin/as directly, to remove the cpp incompatibility The following command also fixes this bug (with modified paths), without breaking it into steps or requiring editing. % /usr/bin/as - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/workarea/dist/include/nspr - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include - I/projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/include /private -mips3 -g0 -cpp -show -G 0 -w -n32 -o os_Irix.o - c /projects/sise/mozilla/devel/workpits/moz/latest_gcc/mozilla/nsprpub/pr/src/md /unix/os_Irix.s % 2) use gas (binutils) There are all sorts of warnings over the web about IRIX6 and GAS, however gas does build, and I have been able to use it, tho not test the output as yet. It seems gcc which comes with the IRIX package fw_gcc 2.95.2 passes arguments specific to SGIs assembler. #!/bin/sh # This script wraps GNU GAS. It is needed as fw_gcc passes # arguments to 'as' intended for SGIs assembler # For gcc to find gas, this script should be located at # /usr/freeware/lib/gcc-lib/mips-sgi-irix6.2/2.95.2/as args=`echo $* | sed -e 's/ -n32/ -mips3/g'` /path/to/binutils-2.10.1/gas/as-new $args
Created attachment 33765 [details] [diff] [review] nsprpub/configure.in: Patch to tell gcc not to cpp .s files before handing them to SGI as
I have tested this patch on nsprpub, and no other problems are introduced.
Interesting idea! Actually the -P flag still invokes the cpp but tells it to not generate "#line" directives. Does this work? AS='$(CC) -x assembler -D_ASM -mips2 $(INCLUDES)'
No that doesn't work. % gcc -x assembler -D_ASM -mips2 - I/projects/sise/mozilla/devel/workpits/moz/0.9_release_gcc/workarea/dist/include /nspr - I/projects/sise/mozilla/devel/workpits/moz/0.9_release_gcc/mozilla/nsprpub/pr/in clude -I/projects/sise/mozilla/devel/workpits/moz/0.9_ as WARNING: ABI specification -n32 conflicts with ISA specification -mips2: defaulting ISA to mips3 "/projects/sise/mozilla/devel/workpits/moz/0.9_release_gcc/mozilla/nsprpub/pr/sr c/md/unix/os_Irix.s", line 26: error(1005): could not open source file "md/_irix.h" #include "md/_irix.h" ^ 1 catastrophic error detected in the compilation of "/projects/sise/mozilla/devel/workpits/moz/0.9_release_gcc/mozilla/nsprpub/pr /src/md/unix/os_Irix.s". Compilation terminated.
Although I have just added this patch, I am starting to agree that your -x assembler is probably the correct solution. Especially now that bug 80809 is also pinpointing the incompatibility between SGI cpp and GNU cpp.
And much to my suprise, both assembler and assembler-with-cpp cause SGI 'as' to call SGI 'cpp' however only assembler-with-cpp seems to passed on the correct - I flags. All that being said, -Wp,-P is the only solution I can find, and I have verified it on a 'configure' build and a IRIX.mk build.
I checked in the patch for mozilla/nsprpub/configure.in (and regenerated configure) on the NSPRPUB_CLIENT_BRANCH and the trunk of NSPR. IRIX.mk is obsolete so I didn't check in the patch for it. Thank you very much for fixing this bug, John!
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
I am building NSS (using gcc) as per the instructions % setenv NS_USE_GCC 1 % setenv NO_MDUPDATE 1 % setenv USE_N32 1 % cd mozilla/security/nss % gmake nss_build_all It does not seem like IRIX.mk is obsolete, as I get this same error. I just pulled IRIX.mk again, and its in the repository. I apply 34475 and my build continues.
*** Bug 3794 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.