[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lost] Patch um alle Makefile.all



Dieser Patch ersetzt alle hart kodierten ld, ar und strip aufrufe in den
Makefile.all,
damit diese mit und ohne Crosscompiler eingesetzt werden können. Das behebt
unter anderem auch Bug #41.
Weiter werden alle `gcc -print-libgcc-file-name` entfernt, da die mit
Crosscompilern
nicht funktionieren, und eigentlich überflüssig sind, da LibGCC direkt
in buildmk.sh
zu den Bibliotheken hinzugefügt werden kann. Das wird mit dem Patch auch
erledigt.
Index: src/kernel/src/Makefile.all
===================================================================
--- src/kernel/src/Makefile.all	(Revision 589)
+++ src/kernel/src/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/lost.krn"
-"$COMPILER_PREFIX"ld -m elf_i386 -olost.krn -Tkernel.ld header.o !(header).o $2
+$LOST_TOOLS_LD -olost.krn -Tkernel.ld header.o !(header).o $2
 mv lost.krn $1/
Index: src/modules/tcpip/Makefile.all
===================================================================
--- src/modules/tcpip/Makefile.all	(Revision 590)
+++ src/modules/tcpip/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/tcpip.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -otcpip.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s tcpip.mod -o $1/tcpip.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -otcpip.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s tcpip.mod -o $1/tcpip.mod
Index: src/modules/file/Makefile.all
===================================================================
--- src/modules/file/Makefile.all	(Revision 590)
+++ src/modules/file/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/file.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -ofile.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s file.mod -o $1/file.mod
+$LOST_TOOLS_LD -ofile.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s file.mod -o $1/file.mod
Index: src/modules/cpp/cpptest/Makefile.all
===================================================================
--- src/modules/cpp/cpptest/Makefile.all	(Revision 589)
+++ src/modules/cpp/cpptest/Makefile.all	(Arbeitskopie)
@@ -1,5 +1,8 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/cpptest.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -ocpptest.mod -T../lib/linkcpp.ld --start-group ../lib/start.o ../lib/startup.o *.o $2 --end-group
+$LOST_TOOLS_LD -ocpptest.mod -T../lib/linkcpp.ld --start-group ../lib/start.o ../lib/startup.o *.o $2 --end-group
 mv cpptest.mod $1/
 
Index: src/modules/cpp/lib/Makefile.all
===================================================================
--- src/modules/cpp/lib/Makefile.all	(Revision 589)
+++ src/modules/cpp/lib/Makefile.all	(Arbeitskopie)
@@ -1,2 +1,6 @@
+shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "AR   library.a"
-"$COMPILER_PREFIX"ar rs library.a `ls *.o -1 | egrep -e "[^(start\.o|startup\|)]" | xargs`
+$LOST_TOOLS_AR rs library.a `ls *.o -1 | egrep -e "[^(start\.o|startup\|)]" | xargs`
Index: src/modules/c/vm86test/Makefile.all
===================================================================
--- src/modules/c/vm86test/Makefile.all	(Revision 590)
+++ src/modules/c/vm86test/Makefile.all	(Arbeitskopie)
@@ -1,7 +1,10 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/apps/vm86test"
 
-"$COMPILER_PREFIX"ld -m elf_i386  -ovm86test -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
+LOST_TOOLS_LD -ovm86test -Ttext=0x40000000 *.o --start-group $2 --end-group
 
 
 mv vm86test $1/apps/
Index: src/modules/c/calc/Makefile.all
===================================================================
--- src/modules/c/calc/Makefile.all	(Revision 590)
+++ src/modules/c/calc/Makefile.all	(Arbeitskopie)
@@ -1,7 +1,8 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/apps/calc"
+$LOST_TOOLS_LD -ocalc -Ttext=0x40000000 *.o --start-group $2 --end-group
 
-"$COMPILER_PREFIX"ld -m elf_i386  -ocalc -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-
-
 mv calc $1/apps/
Index: src/modules/c/shell/Makefile.all
===================================================================
--- src/modules/c/shell/Makefile.all	(Revision 590)
+++ src/modules/c/shell/Makefile.all	(Arbeitskopie)
@@ -1,11 +1,14 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/apps/sh"
 
 if [ -z "`grep '#define CONFIG_SHELL_BUILTIN_ONLY' ../../../include/config.h`" ];
 then
-	"$COMPILER_PREFIX"ld -m elf_i386  -osh -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
+	$LOST_TOOLS_LD -osh -Ttext=0x40000000 *.o --start-group $2 --end-group
 else
-	"$COMPILER_PREFIX"ld -m elf_i386  -osh -Ttext=0x40000000 *.o cmds/*.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
+	$LOST_TOOLS_LD -osh -Ttext=0x40000000 *.o cmds/*.o --start-group $2 --end-group
 fi
 
 mv sh $1/apps/
Index: src/modules/c/shell/cmds/Makefile.all
===================================================================
--- src/modules/c/shell/cmds/Makefile.all	(Revision 589)
+++ src/modules/c/shell/cmds/Makefile.all	(Arbeitskopie)
@@ -1,53 +1,55 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
 
 if [ -z "`grep '#define CONFIG_SHELL_BUILTIN_ONLY' ../../../../include/config.h`" ];
 then
 	echo "LD   $1/apps/bincat"
-	"$COMPILER_PREFIX"ld -m elf_i386  -obincat -Ttext=0x40000000 bincat.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -obincat -Ttext=0x40000000 bincat.o --start-group $2 --end-group
 	mv bincat $1/apps/
 
 	echo "LD   $1/apps/cat"
-	"$COMPILER_PREFIX"ld -m elf_i386  -ocat -Ttext=0x40000000 cat.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -ocat -Ttext=0x40000000 cat.o --start-group $2 --end-group
 	mv cat $1/apps/
 
 	echo "LD   $1/apps/date"
-	"$COMPILER_PREFIX"ld -m elf_i386  -odate -Ttext=0x40000000 date.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -odate -Ttext=0x40000000 date.o --start-group $2 --end-group
 	mv date $1/apps/
 
 	echo "LD   $1/apps/echo"
-	"$COMPILER_PREFIX"ld -m elf_i386  -oecho -Ttext=0x40000000 echo.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -oecho -Ttext=0x40000000 echo.o --start-group $2 --end-group
 	mv echo $1/apps/
 	
 	echo "LD   $1/apps/irc"
-	"$COMPILER_PREFIX"ld -m elf_i386  -oirc -Ttext=0x40000000 irc.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -oirc -Ttext=0x40000000 irc.o --start-group $2 --end-group
 	mv irc $1/apps/
 
 	echo "LD   $1/apps/ls"
-	"$COMPILER_PREFIX"ld -m elf_i386  -ols -Ttext=0x40000000 ls.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -ols -Ttext=0x40000000 ls.o --start-group $2 --end-group
 	mv ls $1/apps/
 	
 	echo "LD   $1/apps/mkdir"
-	"$COMPILER_PREFIX"ld -m elf_i386  -o mkdir -Ttext=0x40000000 mkdir.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -o mkdir -Ttext=0x40000000 mkdir.o --start-group $2 --end-group
 	mv mkdir $1/apps/
 	
 	echo "LD   $1/apps/pipe"
-	"$COMPILER_PREFIX"ld -m elf_i386  -opipe -Ttext=0x40000000 pipe.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -opipe -Ttext=0x40000000 pipe.o --start-group $2 --end-group
 	mv pipe $1/apps/
 
 	echo "LD   $1/apps/ps"
-	"$COMPILER_PREFIX"ld -m elf_i386  -ops -Ttext=0x40000000 ps.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -ops -Ttext=0x40000000 ps.o --start-group $2 --end-group
 	mv ps $1/apps/
 
 	echo "LD   $1/apps/pstree"
-	"$COMPILER_PREFIX"ld -m elf_i386  -opstree -Ttext=0x40000000 pstree.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -opstree -Ttext=0x40000000 pstree.o --start-group $2 --end-group
 	mv pstree $1/apps/
 
 	echo "LD   $1/apps/pwd"
-	"$COMPILER_PREFIX"ld -m elf_i386  -opwd -Ttext=0x40000000 pwd.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -opwd -Ttext=0x40000000 pwd.o --start-group $2 --end-group
 	mv pwd $1/apps/
 
 	echo "LD   $1/apps/symlink"
-	"$COMPILER_PREFIX"ld -m elf_i386  -osymlink -Ttext=0x40000000 symlink.o --start-group $2 --end-group
+	$LOST_TOOLS_LD -osymlink -Ttext=0x40000000 symlink.o --start-group $2 --end-group
 	mv symlink $1/apps/
 fi
 
Index: src/modules/c/mousetest/Makefile.all
===================================================================
--- src/modules/c/mousetest/Makefile.all	(Revision 590)
+++ src/modules/c/mousetest/Makefile.all	(Arbeitskopie)
@@ -1,7 +1,9 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/apps/mtest"
+$LOST_TOOLS_LD -omtest -Ttext=0x40000000 *.o --start-group $2 --end-group
 
-"$COMPILER_PREFIX"ld -m elf_i386  -omtest -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
 
-
 mv mtest $1/apps/
Index: src/modules/c/desktop/Makefile.all
===================================================================
--- src/modules/c/desktop/Makefile.all	(Revision 590)
+++ src/modules/c/desktop/Makefile.all	(Arbeitskopie)
@@ -1,7 +1,10 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/apps/desktop"
 
-"$COMPILER_PREFIX"ld -m elf_i386  -odesktop -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
+$LOST_TOOLS_LD -odesktop -Ttext=0x40000000 *.o --start-group $2 --end-group
 
 
 mv desktop $1/apps/
Index: src/modules/c/yasm/Makefile.all
===================================================================
--- src/modules/c/yasm/Makefile.all	(Revision 590)
+++ src/modules/c/yasm/Makefile.all	(Arbeitskopie)
@@ -2,8 +2,8 @@
 export LOST_BUILDMK_ROOT=$3
 source $3/config.sh
 
-libs="$LIB_GCC $2"
+libs="$2"
 
 echo "LD   $1/apps/yasm"
-$LOST_TOOLS_LD -oyasm.bin -Ttext=0x40000000 --start-group `find -name '*.o'` $libs --end-group `gcc -print-libgcc-file-name`
+$LOST_TOOLS_LD -oyasm.bin -Ttext=0x40000000 --start-group `find -name '*.o'` $libs --end-group
 mv yasm.bin $1/apps/yasm
Index: src/modules/pas/lpt/Makefile.all
===================================================================
--- src/modules/pas/lpt/Makefile.all	(Revision 590)
+++ src/modules/pas/lpt/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/lpt.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -olpt.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group `gcc -print-libgcc-file-name`
-strip -s lpt.mod -o $1/lpt.mod
+$LOST_TOOLS_LD -olpt.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group
+$LOST_TOOLS_STRIP -s lpt.mod -o $1/lpt.mod
Index: src/modules/pas/pashello/Makefile.all
===================================================================
--- src/modules/pas/pashello/Makefile.all	(Revision 590)
+++ src/modules/pas/pashello/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/pashello.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -opashello.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group `gcc -print-libgcc-file-name`
-strip -s pashello.mod -o $1/pashello.mod
+$LOST_TOOLS_LD -opashello.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group
+$LOST_TOOLS_STRIP -s pashello.mod -o $1/pashello.mod
Index: src/modules/pas/kirc/Makefile.all
===================================================================
--- src/modules/pas/kirc/Makefile.all	(Revision 590)
+++ src/modules/pas/kirc/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/kirc.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -okirc.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group `gcc -print-libgcc-file-name`
-strip -s kirc.mod -o $1/kirc.mod
+$LOST_TOOLS_LD -okirc.mod -Ttext=0x40000000 *.o --start-group ../lib/units/*.a $2 --end-group
+$LOST_TOOLS_STRIP -s kirc.mod -o $1/kirc.mod
Index: src/modules/gui/Makefile.all
===================================================================
--- src/modules/gui/Makefile.all	(Revision 589)
+++ src/modules/gui/Makefile.all	(Arbeitskopie)
@@ -1,6 +1,9 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/gui.mod"
-"$COMPILER_PREFIX"ld -Ttext=0x40000000 -ogui.mod src/*.o src/freetype/base/ftbase.o src/freetype/base/ftsystem.o src/freetype/base/ftglyph.o src/freetype/base/ftbitmap.o src/freetype/base/ftinit.o src/freetype/autofit/autofit.o src/freetype/smooth/smooth.o src/freetype/psaux/psaux.o src/freetype/psnames/psnames.o src/freetype/pshinter/pshinter.o src/freetype/truetype/truetype.o src/freetype/raster/raster.o src/freetype/gzip/ftgzip.o src/freetype/lzw/ftlzw.o src/freetype/sfnt/sfnt.o --start-group $2 --end-group
+$LOST_TOOLS_LD  -Ttext=0x40000000 -ogui.mod src/*.o src/freetype/base/ftbase.o src/freetype/base/ftsystem.o src/freetype/base/ftglyph.o src/freetype/base/ftbitmap.o src/freetype/base/ftinit.o src/freetype/autofit/autofit.o src/freetype/smooth/smooth.o src/freetype/psaux/psaux.o src/freetype/psnames/psnames.o src/freetype/pshinter/pshinter.o src/freetype/truetype/truetype.o src/freetype/raster/raster.o src/freetype/gzip/ftgzip.o src/freetype/lzw/ftlzw.o src/freetype/sfnt/sfnt.o --start-group $2 --end-group
 mv gui.mod $1/
 #Andere Formate (in def ftmodule.h aktivieren):
 #src/freetype/type42/type42.o
Index: src/modules/rpcbench/Makefile.all
===================================================================
--- src/modules/rpcbench/Makefile.all	(Revision 590)
+++ src/modules/rpcbench/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/rpcbench.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -orpcbench.mod  --start-group *.o $2 --end-group `gcc -print-libgcc-file-name`
-strip -s rpcbench.mod -o $1/rpcbench.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -orpcbench.mod  --start-group *.o $2 --end-group
+$LOST_TOOLS_STRIP -s rpcbench.mod -o $1/rpcbench.mod
Index: src/modules/skeleton/Makefile.all
===================================================================
--- src/modules/skeleton/Makefile.all	(Revision 590)
+++ src/modules/skeleton/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/skeleton.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -oskeleton.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s skeleton.mod -o $1/skeleton.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -oskeleton.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s skeleton.mod -o $1/skeleton.mod
Index: src/modules/rtl8139/Makefile.all
===================================================================
--- src/modules/rtl8139/Makefile.all	(Revision 590)
+++ src/modules/rtl8139/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/rtl8139.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -ortl8139.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s rtl8139.mod -o $1/rtl8139.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -ortl8139.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s rtl8139.mod -o $1/rtl8139.mod
Index: src/modules/sysinfo/Makefile.all
===================================================================
--- src/modules/sysinfo/Makefile.all	(Revision 590)
+++ src/modules/sysinfo/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/sysinfo.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -osysinfo.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
+$LOST_TOOLS_LD -Ttext=0x40000000 -osysinfo.mod  *.o --start-group $2 --end-group
 mv sysinfo.mod $1/
Index: src/modules/vterm/Makefile.all
===================================================================
--- src/modules/vterm/Makefile.all	(Revision 590)
+++ src/modules/vterm/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/vterm.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -ovterm.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s vterm.mod -o $1/vterm.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -ovterm.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s vterm.mod -o $1/vterm.mod
Index: src/modules/vesa/Makefile.all
===================================================================
--- src/modules/vesa/Makefile.all	(Revision 590)
+++ src/modules/vesa/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/vesa.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -ovesa.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s vesa.mod -o $1/vesa.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -ovesa.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s vesa.mod -o $1/vesa.mod
Index: src/modules/kbc/Makefile.all
===================================================================
--- src/modules/kbc/Makefile.all	(Revision 590)
+++ src/modules/kbc/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/kbc.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -okbc.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s kbc.mod -o $1/kbc.mod
+$LOST_TOOLS_LD -m elf_i386 -okbc.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s kbc.mod -o $1/kbc.mod
Index: src/modules/keyboard/Makefile.all
===================================================================
--- src/modules/keyboard/Makefile.all	(Revision 589)
+++ src/modules/keyboard/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/keyboard.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -okeyboard.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_LD -okeyboard.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
 mv keyboard.mod $1/
Index: src/modules/tmp/Makefile.all
===================================================================
--- src/modules/tmp/Makefile.all	(Revision 590)
+++ src/modules/tmp/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/tmp.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -otmp.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s tmp.mod -o $1/tmp.mod
+$LOST_TOOLS_LD -otmp.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s tmp.mod -o $1/tmp.mod
Index: src/modules/ide/Makefile.all
===================================================================
--- src/modules/ide/Makefile.all	(Revision 590)
+++ src/modules/ide/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/ide.mod"
-"$COMPILER_PREFIX"ld -Ttext=0x40000000 -oide.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s ide.mod -o $1/ide.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -oide.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s ide.mod -o $1/ide.mod
Index: src/modules/dma/Makefile.all
===================================================================
--- src/modules/dma/Makefile.all	(Revision 590)
+++ src/modules/dma/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/dma.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -odma.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s dma.mod -o $1/dma.mod
+$LOST_TOOLS_LD -odma.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s dma.mod -o $1/dma.mod
Index: src/modules/cmos/Makefile.all
===================================================================
--- src/modules/cmos/Makefile.all	(Revision 590)
+++ src/modules/cmos/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/cmos.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -ocmos.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s cmos.mod -o $1/cmos.mod
+$LOST_TOOLS_LD -ocmos.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s cmos.mod -o $1/cmos.mod
Index: src/modules/console/Makefile.all
===================================================================
--- src/modules/console/Makefile.all	(Revision 590)
+++ src/modules/console/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/console.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -oconsole.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s console.mod -o $1/console.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -oconsole.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s console.mod -o $1/console.mod
Index: src/modules/init/Makefile.all
===================================================================
--- src/modules/init/Makefile.all	(Revision 590)
+++ src/modules/init/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/init.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -oinit.mod  *.o */*.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s init.mod -o $1/init.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -oinit.mod  *.o */*.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s init.mod -o $1/init.mod
Index: src/modules/lib/Makefile.all
===================================================================
--- src/modules/lib/Makefile.all	(Revision 589)
+++ src/modules/lib/Makefile.all	(Arbeitskopie)
@@ -1,2 +1,5 @@
 echo "AR   library.a"
-"$COMPILER_PREFIX"ar rs library.a *.o */*.o */*/*.o
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
+$LOST_TOOLS_AR rs library.a *.o */*.o */*/*.o
Index: src/modules/testlib/Makefile.all
===================================================================
--- src/modules/testlib/Makefile.all	(Revision 590)
+++ src/modules/testlib/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,8 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/tests.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -otests.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s tests.mod -o $1/tests.mod
+$LOST_TOOLS_LD -otests.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+
+$LOST_TOOLS_STRIP -s tests.mod -o $1/tests.mod
Index: src/modules/floppy/Makefile.all
===================================================================
--- src/modules/floppy/Makefile.all	(Revision 590)
+++ src/modules/floppy/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/floppy.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -ofloppy.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s floppy.mod -o $1/floppy.mod
+$LOST_TOOLS_LD -ofloppy.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s floppy.mod -o $1/floppy.mod
Index: src/modules/fat/Makefile.all
===================================================================
--- src/modules/fat/Makefile.all	(Revision 590)
+++ src/modules/fat/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/fat.mod"
-"$COMPILER_PREFIX"ld  -m elf_i386 -ofat.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s fat.mod -o $1/fat.mod
+$LOST_TOOLS_LD -ofat.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s fat.mod -o $1/fat.mod
Index: src/modules/pci/Makefile.all
===================================================================
--- src/modules/pci/Makefile.all	(Revision 590)
+++ src/modules/pci/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/pci.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -opci.mod -Ttext=0x40000000 *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s pci.mod -o $1/pci.mod
+$LOST_TOOLS_LD -opci.mod -Ttext=0x40000000 *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s pci.mod -o $1/pci.mod
Index: src/modules/textterm/Makefile.all
===================================================================
--- src/modules/textterm/Makefile.all	(Revision 590)
+++ src/modules/textterm/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/textterm.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -otextterm.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s textterm.mod -o $1/textterm.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -otextterm.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s textterm.mod -o $1/textterm.mod
Index: src/modules/vga/Makefile.all
===================================================================
--- src/modules/vga/Makefile.all	(Revision 590)
+++ src/modules/vga/Makefile.all	(Arbeitskopie)
@@ -1,4 +1,7 @@
 shopt -s extglob
+export LOST_BUILDMK_ROOT=$3
+source $3/config.sh
+
 echo "LD   $1/vga.mod"
-"$COMPILER_PREFIX"ld -m elf_i386 -Ttext=0x40000000 -ovga.mod  *.o --start-group $2 --end-group `gcc -print-libgcc-file-name`
-strip -s vga.mod -o $1/vga.mod
+$LOST_TOOLS_LD -Ttext=0x40000000 -ovga.mod  *.o --start-group $2 --end-group
+$LOST_TOOLS_STRIP -s vga.mod -o $1/vga.mod
Index: config.sh
===================================================================
--- config.sh	(Revision 590)
+++ config.sh	(Arbeitskopie)
@@ -19,6 +19,7 @@
     LOST_TOOLS_GCC=$COMPILER_PREFIX"gcc -m64 -g -c -nostdinc -fno-leading-underscore -fno-omit-frame-pointer -Wall -fno-strict-aliasing -O0 -I . -iquote ."
     LOST_TOOLS_GPP=$COMPILER_PREFIX"g++ -m64 -g -c -fno-leading-underscore -fno-omit-frame-pointer -Wall -fno-strict-aliasing -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-use-cxa-atexit -O0"
     LOST_TOOLS_OBJCOPY=$COMPILER_PREFIX"objcopy -B i386:x86-64"
+    LOST_TOOLS_STRIP=$COMPILER_PREFIX"strip -F elf64-x86-64"
 else
     COMPILER_PREFIX=$COMPILER_PREFIX_I386
     
@@ -28,8 +29,11 @@
     LOST_TOOLS_GCC=$COMPILER_PREFIX"gcc -m32 -g -c -nostdinc -fno-leading-underscore -fno-omit-frame-pointer -Wall -fno-strict-aliasing -O0 -fno-builtin -I . -I-"
     LOST_TOOLS_GPP=$COMPILER_PREFIX"g++ -m32 -g -c -fno-leading-underscore -fno-omit-frame-pointer -Wall -fno-strict-aliasing -nostdlib -fno-builtin -fno-rtti -fno-exceptions -fno-use-cxa-atexit -O0"
     LOST_TOOLS_OBJCOPY=$COMPILER_PREFIX"objcopy -B i386:i386"
+    LOST_TOOLS_STRIP=$COMPILER_PREFIX"strip -F elf32-i386"
 fi
 
 #Libgcc bei LD standardmaessig mitlinken
-LIB_GCC="`\"$COMPILER_PREFIX\"gcc -print-libgcc-file-name`"
+if [ -z $LIB_GCC ]; then
+    LIB_GCC="`\"$COMPILER_PREFIX\"gcc -print-libgcc-file-name`"
+fi
 
Index: buildmk.sh
===================================================================
--- buildmk.sh	(Revision 590)
+++ buildmk.sh	(Arbeitskopie)
@@ -100,7 +100,7 @@
 fi
 
 if [ -f Makefile.all ]; then
-  echo -e \\tsh Makefile.all '$(BUILD_ROOT)' \'$LIBDIRS\' \'$LOST_BUILDMK_ROOT\' >> Makefile
+  echo -e \\tsh Makefile.all '$(BUILD_ROOT)' \'$LIB_GCC $LIBDIRS\' \'$LOST_BUILDMK_ROOT\' >> Makefile
 fi
 
 cat <<EOF >> Makefile