Index: m3-sys/cminstall/src/config-no-install/AMD64_SOLARIS =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/AMD64_SOLARIS,v retrieving revision 1.8 diff -u -w -r1.8 AMD64_SOLARIS --- m3-sys/cminstall/src/config-no-install/AMD64_SOLARIS 10 May 2010 02:40:18 -0000 1.8 +++ m3-sys/cminstall/src/config-no-install/AMD64_SOLARIS 10 May 2010 07:32:00 -0000 @@ -1,17 +1,13 @@ % Copyright 1996-2000 Critical Mass, Inc. All rights reserved. % See file COPYRIGHT-CMASS for details. -% readonly TARGET = "AMD64_SOLARIS" -readonly GNU_PLATFORM = "i686-solaris2.10" % "cpu-os" string for GNU - % deliberately i686 -readonly C_COMPILER = "SUN" % or GNU - -SunXArch = "amd64" - -% If you use Sun assembler, you might need: -% m3back_debug = "-gstabs" -% to avoid the .stabd that -gstabs+ produces. +readonly GNU_PLATFORM = "i586-sun-solaris2.10" % "cpu-os" string for GNU + % deliberately i586 +readonly C_COMPILER = "SUN" % or GNU to use gcc (untested) +readonly SYSTEM_ASM = "/usr/ccs/bin/as -Qy -s -xarch=generic64" +SunXArch = "generic64" % or amd64, equivalent? +m3back_debug = "-gstabs" % Sun assembler doesn't like .stabd. include("AMD64.common") include("Solaris.common") Index: m3-sys/cminstall/src/config-no-install/I386_SOLARIS =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/I386_SOLARIS,v retrieving revision 1.9 diff -u -w -r1.9 I386_SOLARIS --- m3-sys/cminstall/src/config-no-install/I386_SOLARIS 10 May 2010 02:40:18 -0000 1.9 +++ m3-sys/cminstall/src/config-no-install/I386_SOLARIS 10 May 2010 07:32:00 -0000 @@ -1,16 +1,12 @@ % Copyright 1996-2000 Critical Mass, Inc. All rights reserved. % See file COPYRIGHT-CMASS for details. -% readonly TARGET = "I386_SOLARIS" -readonly GNU_PLATFORM = "i686-solaris2.10" % "cpu-os" string for GNU -readonly C_COMPILER = "SUN" % or GNU - +readonly GNU_PLATFORM = "i586-solaris2.10" % "cpu-os" string for GNU +readonly C_COMPILER = "SUN" % or GNU to use gcc (untested) +readonly SYSTEM_ASM = "/usr/ccs/bin/as -Qy -s" SunXArch = "pentium_pro" - -% If you use Sun assembler, you might need: -% m3back_debug = "-gstabs" -% to avoid the .stabd that -gstabs+ produces. +m3back_debug = "-gstabs" % Sun assembler doesn't like .stabd. include("I386.common") include("Solaris.common") Index: m3-sys/cminstall/src/config-no-install/SOLgnu =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/SOLgnu,v retrieving revision 1.17 diff -u -w -r1.17 SOLgnu --- m3-sys/cminstall/src/config-no-install/SOLgnu 17 Feb 2010 05:03:54 -0000 1.17 +++ m3-sys/cminstall/src/config-no-install/SOLgnu 10 May 2010 07:32:00 -0000 @@ -2,14 +2,14 @@ % See file COPYRIGHT-CMASS for details. % % Standard configuration file for SOLgnu (Solaris 2.x w/gcc) -% readonly TARGET = "SOLgnu" -readonly GNU_PLATFORM = "sparc-solaris2" % "cpu-os" string for GNU -readonly C_COMPILER = "GNU" - +readonly GNU_PLATFORM = "sparc-sun-solaris2.10" % "cpu-os" string for GNU +readonly SYSTEM_ASM = "/usr/ccs/bin/as -Qy -s -K PIC -xarch=v8plus" SunXArch = "v8plus" M3_USE_STACK_WALKER = TRUE +readonly C_COMPILER = "GNU" % or SUN (SOLsun configuration) + include("SPARC.common") include("Solaris.common") Index: m3-sys/cminstall/src/config-no-install/SOLsun =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/SOLsun,v retrieving revision 1.13 diff -u -w -r1.13 SOLsun --- m3-sys/cminstall/src/config-no-install/SOLsun 17 Feb 2010 05:03:55 -0000 1.13 +++ m3-sys/cminstall/src/config-no-install/SOLsun 10 May 2010 07:32:00 -0000 @@ -2,14 +2,14 @@ % See file COPYRIGHT-CMASS for details. % % Standard configuration file for SOLsun (Solaris 2.x w/Sun C) -% readonly TARGET = "SOLsun" -readonly GNU_PLATFORM = "sparc-solaris2" % "cpu-os" string for GNU -readonly C_COMPILER = "SUN" - +readonly GNU_PLATFORM = "sparc-sun-solaris2.10" % "cpu-os" string for GNU +readonly SYSTEM_ASM = "/usr/ccs/bin/as -Qy -s -K PIC -xarch=v8plus" SunXArch = "v8plus" M3_USE_STACK_WALKER = TRUE +readonly C_COMPILER = "SUN" % or GNU (SOLgnu configuration) + include("SPARC.common") include("Solaris.common") Index: m3-sys/cminstall/src/config-no-install/SPARC64_SOLARIS =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/SPARC64_SOLARIS,v retrieving revision 1.8 diff -u -w -r1.8 SPARC64_SOLARIS --- m3-sys/cminstall/src/config-no-install/SPARC64_SOLARIS 17 Feb 2010 05:03:55 -0000 1.8 +++ m3-sys/cminstall/src/config-no-install/SPARC64_SOLARIS 10 May 2010 07:32:00 -0000 @@ -1,12 +1,11 @@ % Copyright 1996-2000 Critical Mass, Inc. All rights reserved. % See file COPYRIGHT-CMASS for details. -% readonly TARGET = "SPARC64_SOLARIS" -readonly GNU_PLATFORM = "sparc64-solaris2" % "cpu-os" string for GNU +readonly GNU_PLATFORM = "sparc64-sun-solaris2.10" % "cpu-os" string for GNU readonly C_COMPILER = "SUN" -%SunXArch = "v9" -SunXArch = "generic64" +readonly SYSTEM_ASM = "/usr/ccs/bin/as -Qy -s -K PIC -xarch=v9" +SunXArch = "generic64" % or v9, equivalent? include("SPARC64.common") include("Solaris.common") Index: m3-sys/cminstall/src/config-no-install/Solaris.common =================================================================== RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/Solaris.common,v retrieving revision 1.35 diff -u -w -r1.35 Solaris.common --- m3-sys/cminstall/src/config-no-install/Solaris.common 10 May 2010 02:45:30 -0000 1.35 +++ m3-sys/cminstall/src/config-no-install/Solaris.common 10 May 2010 07:32:00 -0000 @@ -9,43 +9,6 @@ readonly TARGET_OS = "SOLARIS" readonly SYSTEM_AR = "/usr/ccs/bin/ar" readonly GccMBits = {"32BITS" : "32", "64BITS" : "64"}{WORD_SIZE} -if equal(TARGET, "I386_SOLARIS") or equal(TARGET, "AMD64_SOLARIS") - proc configure_assembler() is - % - % Favor GNU as, see: - % http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html - % http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 - % - if defined("SYSTEM_ASM") - return - end - proc FileExists (a) is - return not stale (a, a) - end - foreach a in [ "/opt/csw/bin/gas", - "/opt/csw/gnu/as", - "/usr/sfw/bin/gas" ] - if FileExists(a) - readonly SYSTEM_ASM = a + " --noexecstack -s -" + GccMBits - return - end - end - % - % Fallback to Sun assember. - % - if equal(TARGET, "I386_SOLARIS") - readonly SYSTEM_ASM = "/usr/ccs/bin/as -s" - else - readonly SYSTEM_ASM = "/usr/ccs/bin/as -s -xarch=" & SunXArch - end - end -else - % - % Sun assembler seems always ok for Sparc. - % -s means to put symbols where linker will not automatically strip them - % - readonly SYSTEM_ASM = "/usr/ccs/bin/as -s -K PIC -xarch=" & SunXArch -end proc configure_c_compiler() is end @@ -59,7 +22,13 @@ % newer compiler says: % cc: Warning: -xarch=v8plus is deprecated, use -m32 -xarch=sparc instead + % cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs + % cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs % cc: Warning: -xarch=generic64 is deprecated, use -m64 to create 64-bit programs + % + % Probe for this and if found, use what it recommends. + % We presumably can't just always use the new syntax, in case + % we are using older tools that don't understand it. local cc = "/usr/bin/cc -g -mt -xldscope=symbolic " local old = "-xarch=" & SunXArch @@ -73,9 +42,9 @@ cc = cc & old end if equal(TARGET, "I386_SOLARIS") or equal(TARGET, "AMD64_SOLARIS") - SYSTEM_CC = cc & " -Kpic" + SYSTEM_CC = cc & " -xF -Kpic" else - SYSTEM_CC = cc & " -xcode=pic32" + SYSTEM_CC = cc & " -xF -xcode=pic13" % pic32 if many external references end end Index: m3-sys/m3cc/gcc/gcc/config/i386/sol2-10.h =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3cc/gcc/gcc/config/i386/sol2-10.h,v retrieving revision 1.1.1.2 diff -u -w -r1.1.1.2 sol2-10.h --- m3-sys/m3cc/gcc/gcc/config/i386/sol2-10.h 14 Apr 2008 03:13:11 -0000 1.1.1.2 +++ m3-sys/m3cc/gcc/gcc/config/i386/sol2-10.h 10 May 2010 07:32:00 -0000 @@ -39,6 +39,15 @@ #ifndef HAVE_AS_IX86_DIFF_SECT_DELTA #undef JUMP_TABLES_IN_TEXT_SECTION #define JUMP_TABLES_IN_TEXT_SECTION 1 + +/* The native Solaris assembler cannot handle the SYMBOL-. syntax, but + requires SYMBOL@rel/@rel64 instead. */ +#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \ + do { \ + fputs (integer_asm_op (SIZE, FALSE), FILE); \ + assemble_name (FILE, LABEL); \ + fputs (SIZE == 8 ? "@rel64" : "@rel", FILE); \ + } while (0) #endif #undef NO_PROFILE_COUNTERS Index: m3-sys/m3cc/src/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3cc/src/m3makefile,v retrieving revision 1.138 diff -u -w -r1.138 m3makefile --- m3-sys/m3cc/src/m3makefile 10 May 2010 02:02:05 -0000 1.138 +++ m3-sys/m3cc/src/m3makefile 10 May 2010 07:32:02 -0000 @@ -139,17 +139,18 @@ % If buiding native gcc driver, add: % -with-as=/usr/ccs/bin/as -with-ld=/usr/ccs/bin/ld - % Sun assembler doesn't like .stabd. + "I386_SOLARIS" : "-without-gnu-as -without-gnu-ld -with-arch-32=i586", % arch=i586 for atomics + "AMD64_SOLARIS" : "-without-gnu-as -without-gnu-ld -with-arch-32=i586", % arch=i586 for atomics (biarch) + % see: http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 + % http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html % GNU assembler is ok with .stabd. + % Sun assembler doesn't like .stabd. + % Sun assembler doesn't like cross section subtraction, as occurs + % with -fPIC -funwind-table -m64, but gcc 4.4.0 fixes that and I ported the fix. % However GNU assembler moves around: /usr/sfw/bin/gas vs. /opt/csw/gnu/as - - "I386_SOLARIS" : "-with-gnu-as -without-gnu-ld -with-arch-32=i586", % arch=i586 for atomics - "AMD64_SOLARIS" : "-with-gnu-as -without-gnu-ld -with-arch-32=i586", % arch=i586 for atomics (biarch) - % Why GNU as, see: - % http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 - % http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html % If buiding native gcc driver, add: - % -with-as=/usr/sfw/bin/gas -with-ld=/usr/ccs/bin/ld + % -with-as=/usr/ccs/bin/as -with-ld=/usr/ccs/bin/ld + % or -with-as=/usr/sfw/bin/gas -with-ld=/usr/ccs/bin/ld % or /opt/csw/gnu/as, or /opt/csw/bin/gas, or gas "SOLgnu" : "-without-gnu-ld -without-gnu-as -with-cpu=v9", % cpu=v9 for atomics Index: m3-sys/m3cc/src/platforms.quake =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3cc/src/platforms.quake,v retrieving revision 1.14 diff -u -w -r1.14 platforms.quake --- m3-sys/m3cc/src/platforms.quake 10 May 2010 05:20:20 -0000 1.14 +++ m3-sys/m3cc/src/platforms.quake 10 May 2010 07:32:02 -0000 @@ -18,7 +18,7 @@ "AMD64_NETBSD" : "amd64-netbsd", "AMD64_NT" : "amd64-pc-mingw32", "AMD64_OPENBSD" : "amd64-openbsd", - "AMD64_SOLARIS" : "i586-solaris2.10", % deliberately i586 + "AMD64_SOLARIS" : "i586-sun-solaris2.10", % deliberately i586 "ARM_DARWIN" : "arm-apple-darwin8", "ARM_LINUX" : "arm-linux-uclibc", "FBSD_ALPHA": "alpha-unknown-freebsd6", @@ -33,7 +33,7 @@ "I386_NETBSD" : "i586-unknown-netbsdelf", "I386_NT" : "i586-pc-mingw32", "I386_OPENBSD" : "i586-openbsd", - "I386_SOLARIS" : "i586-solaris2.10", + "I386_SOLARIS" : "i586-sun-solaris2.10", "IA64_FREEBSD" : "ia64-freebsd7", "IA64_HPUX" : "ia64-hpux", "IA64_LINUX" : "ia64-linux", Index: scripts/python/pylib.py =================================================================== RCS file: /usr/cvs/cm3/scripts/python/pylib.py,v retrieving revision 1.307 diff -u -w -r1.307 pylib.py --- scripts/python/pylib.py 10 May 2010 02:51:50 -0000 1.307 +++ scripts/python/pylib.py 10 May 2010 07:32:04 -0000 @@ -1129,13 +1129,13 @@ # pick the compiler if Config == "ALPHA32_VMS": - CCompiler = "CCompiler" + CCompiler = "cc" CCompilerFlags = " " elif Config == "ALPHA64_VMS": - CCompiler = "CCompiler" + CCompiler = "cc" CCompilerFlags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": - CCompiler = "/usr/bin/CCompiler" + CCompiler = "/usr/bin/cc" CCompilerFlags = "-g -mt -xldscope=symbolic " else: # gcc platforms @@ -1148,7 +1148,8 @@ "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " - CCompilerFlags = CCompilerFlags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", + CCompilerFlags = CCompilerFlags + ({ + "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", @@ -1158,9 +1159,9 @@ "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", - "SOLsun" : " -xarch=v8plus -xcode=pic32 ", - "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", - "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", + "SOLsun" : " -xarch=v8plus -xcode=pic13 ", + "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic13 ", + "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic13 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") @@ -1191,31 +1192,19 @@ # pick assembler - AssemblerFlags = " " - if StringTagged(Target, "VMS") and AssembleOnTarget: - AssemblerMk = "macro" # not right, come back to it later - AssemblerSh = "macro" # not right, come back to it later + Assembler = "macro" # not right, come back to it later AssemblerFlags = "/alpha " # not right, come back to it later - elif Target == "I386_SOLARIS" or Target == "AMD64_SOLARIS": - # - # see http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html - # see http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 - # - a = (" if test -x /usr/sfw/bin/gas ; then echo /usr/sfw/bin/gas ; \\\n" - + " elif test -x /opt/csw/gnu/as ; then echo /opt/csw/gnu/as ; \\\n" - + " else echo \"unable to find GNU assembler\" ; fi") - AssemblerMk = "$(shell " + a + ")" - AssemblerSh = "`" + a + "`" elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): - AssemblerMk = "/usr/ccs/bin/as" - AssemblerSh = "/usr/ccs/bin/as" + # see http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html + Assembler = "/usr/ccs/bin/as" else: - AssemblerMk = "as" - AssemblerSh = "as" + Assembler = "as" # set assembler flags + AssemblerFlags = " " + if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. @@ -1229,13 +1218,12 @@ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", - # -s puts symbols where linker won't automatically strip them - "I386_SOLARIS" : " -s ", - "AMD64_SOLARIS" : " -s -xarch=amd64 ", - "SOLgnu" : " -s -xarch=v8plus ", - "SOLsun" : " -s -xarch=v8plus ", - "SPARC32_SOLARIS" : " -s -xarch=v8plus ", - "SPARC64_SOLARIS" : " -s -xarch=v9 ", + "I386_SOLARIS" : " -Qy -s", + "AMD64_SOLARIS" : " -Qy -s -xarch=generic64 ", + "SOLgnu" : " -Qy -s -K PIC -xarch=v8plus ", + "SOLsun" : " -Qy -s -K PIC -xarch=v8plus ", + "SPARC32_SOLARIS" : " -Qy -s -K PIC -xarch=v8plus ", + "SPARC64_SOLARIS" : " -Qy -s -K PIC -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { @@ -1248,8 +1236,7 @@ CCompiler = GnuPlatformPrefix + CCompiler Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: - AssemblerMk = GnuPlatformPrefix + AssemblerMk - AssemblerSh = GnuPlatformPrefix + AssemblerSh + Assembler = GnuPlatformPrefix + Assembler # # squeeze runs of spaces and spaces at ends @@ -1262,6 +1249,7 @@ Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) + AssemblerFlags = re.sub("^ +", "", AssemblerFlags) AssemblerFlags = re.sub(" +", " ", AssemblerFlags) AssemblerFlags = re.sub(" +$", "", AssemblerFlags) @@ -1309,7 +1297,7 @@ + "CC ?= " + CCompiler + "\n" + "CFLAGS ?= " + CCompilerFlags + "\n" + "Compile=" + Compile + "\n" - + "Assemble=" + AssemblerMk + " " + AssemblerFlags + "\n" + + "Assemble=" + Assembler + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") @@ -1318,7 +1306,7 @@ + "CC=${CC:-" + CCompiler + "}\n" + "CFLAGS=${CFLAGS:-" + CCompilerFlags + "}\n" + "Compile=" + Compile + "\n" - + "Assemble=" + AssemblerSh + " " + AssemblerFlags + "\n" + + "Assemble=" + Assembler + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") @@ -1346,11 +1334,11 @@ else: if AssembleOnHost: # must have cross assembler - a = AssemblerMk + " " + fullpath + " -o " + BootDir + "/" + Object + a = Assembler + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: - VmsMake.write("$ " + AssemblerMk + " " + a + "\n") + VmsMake.write("$ " + Assembler + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n"