Ver Fonte

* Accept weak for Solaris targets

git-svn-id: trunk@14224 -
pierre há 15 anos atrás
pai
commit
0687f16a04
4 ficheiros alterados com 84 adições e 54 exclusões
  1. 30 6
      compiler/Makefile
  2. 2 0
      compiler/ogelf.pas
  3. 5 1
      compiler/systems.pas
  4. 47 47
      compiler/utils/fpcfg.inc

+ 30 - 6
compiler/Makefile

@@ -1,10 +1,10 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/11/05]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/11/17]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
 BSDs = freebsd netbsd openbsd darwin
-UNIXs = linux $(BSDs) solaris qnx
+UNIXs = linux $(BSDs) solaris qnx haiku
 LIMIT83fs = go32v2 os2 emx watcom
 OSNeedsComspecToRunBatch = go32v2 watcom
 FORCE:
@@ -524,6 +524,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_DIRS+=utils
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_DIRS+=utils
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_DIRS+=utils
 endif
@@ -698,6 +701,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override TARGET_PROGRAMS+=pp
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_PROGRAMS+=pp
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_PROGRAMS+=pp
 endif
@@ -873,6 +879,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 endif
@@ -1047,6 +1056,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
@@ -1221,6 +1233,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_TARGETDIR+=.
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_TARGETDIR+=.
 endif
@@ -1395,6 +1410,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
@@ -2336,6 +2354,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -2396,9 +2417,9 @@ else
 UNITDIR_RTL=$(PACKAGEDIR_RTL)
 endif
 ifdef CHECKDEPEND
-$(PACKAGEDIR_RTL)/$(FPCMADE):
-	$(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
 endif
 else
 PACKAGEDIR_RTL=
@@ -3113,6 +3134,9 @@ endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 TARGET_DIRS_UTILS=1
 endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+TARGET_DIRS_UTILS=1
+endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 TARGET_DIRS_UTILS=1
 endif

+ 2 - 0
compiler/ogelf.pas

@@ -933,6 +933,8 @@ implementation
                   end;
                 AB_EXTERNAL :
                   elfsym.st_info:=STB_GLOBAL shl 4;
+                AB_WEAK_EXTERNAL :
+                  elfsym.st_info:=STB_WEAK shl 4;
                 AB_GLOBAL :
                   begin
                     elfsym.st_value:=objsym.address;

+ 5 - 1
compiler/systems.pas

@@ -404,6 +404,10 @@ interface
                          system_powerpc64_darwin,system_x86_64_darwin,
                          system_arm_darwin];
 
+       {all solaris systems }
+       systems_solaris = [system_sparc_solaris, system_i386_solaris,
+			  system_x86_64_solaris];
+
        { systems supporting Objective-C }
        system_objc_supported = systems_darwin;
 
@@ -428,7 +432,7 @@ interface
                                          system_ia64_win64]+system_linux;
 
        { all systems for which weak linking has been tested/is supported }
-       system_weak_linking = systems_darwin;
+       system_weak_linking = systems_darwin + systems_solaris;
 
        system_internal_sysinit = [system_i386_linux,system_i386_win32];
 

+ 47 - 47
compiler/utils/fpcfg.inc

@@ -3,51 +3,51 @@ const fpcfg : array[0..3] of string[240]=(
 {$else Delphi}
 const fpcfg : array[0..3,1..240] of char=(
 {$endif Delphi}
-  '#IFDEF NORMAL'#013#010+
-  ' -Ci'#013#010+
-  ' -XS'#013#010+
-  ' -T%fpctargetos%'#013#010+
-  ' -Sg'#013#010+
-  ' -O1'#013#010+
-  ' -Oppentium3'#013#010+
-  ' -Ratt'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#013#010+
-  ' -g-'#013#010+
-  ' -p-'#013,#010+
-  ' -b-'#013#010+
-  '#ENDIF'#013#010+
-  #013#010+
-  '#IFDEF DEBUG'#013#010+
-  ' -Ci'#013#010+
-  ' -XS'#013#010+
-  ' -T%fpctargetos%'#013#010+
-  ' -Sg'#013#010+
-  ' -Cr'#013#010+
-  ' -Co'#013#010+
-  ' -Oppentium3'#013#010+
-  ' -Ratt'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctarg','etos%\rtl'#013#010+
-  ' -g'#013#010+
-  ' -p-'#013#010+
-  ' -b-'#013#010+
-  '#ENDIF'#013#010+
-  #013#010+
-  '#IFDEF RELEASE'#013#010+
-  ' -XS'#013#010+
-  ' -T%fpctargetos%'#013#010+
-  ' -Sg'#013#010+
-  ' -O2'#013#010+
-  ' -Oppentium3'#013#010+
-  ' -Ratt'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
-  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
-  ' -Fu%basepath%\units\%fpctarge','t%-%fpctargetos%\rtl'#013#010+
-  ' -g-'#013#010+
-  ' -p-'#013#010+
-  ' -b-'#013#010+
-  '#ENDIF'#013#010
+  '#IFDEF NORMAL'#010+
+  ' -Ci'#010+
+  ' -XS'#010+
+  ' -T%fpctargetos%'#010+
+  ' -Sg'#010+
+  ' -O1'#010+
+  ' -Oppentium3'#010+
+  ' -Ratt'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#010+
+  ' -g-'#010+
+  ' -p-'#010+
+  ' -b-'#010+
+  '#ENDIF'#010,
+  #010+
+  '#IFDEF DEBUG'#010+
+  ' -Ci'#010+
+  ' -XS'#010+
+  ' -T%fpctargetos%'#010+
+  ' -Sg'#010+
+  ' -Cr'#010+
+  ' -Co'#010+
+  ' -Oppentium3'#010+
+  ' -Ratt'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#010+
+  ' -g'#010+
+  ' -p-'#010+
+  ' -b-'#010+
+  '#EN','DIF'#010+
+  #010+
+  '#IFDEF RELEASE'#010+
+  ' -XS'#010+
+  ' -T%fpctargetos%'#010+
+  ' -Sg'#010+
+  ' -O2'#010+
+  ' -Oppentium3'#010+
+  ' -Ratt'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#010+
+  ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#010+
+  ' -g-'#010+
+  ' -p-'#010+
+  ' -b-'#010+
+  '#ENDIF',#010
 );