[clean] Initial import (#834069).

Patrick Uiterwijk puiterwijk at fedoraproject.org
Sat Jul 7 05:59:36 UTC 2012


commit b3ede7be1d1c9f2ce8b300df7e2b1e804a5a37a2
Author: Patrick Uiterwijk <puiterwijk at gmail.com>
Date:   Sat Jul 7 07:59:24 2012 +0200

    Initial import (#834069).

 .gitignore            |    2 +
 clean.32bit.patch     |  377 ++++++++++++++++++++++++++++++++++++++++++
 clean.64bit.patch     |  149 +++++++++++++++++
 clean.clmman.patch    |   14 ++
 clean.htoclean.1      |   10 ++
 clean.localint.patch  |  244 ++++++++++++++++++++++++++++
 clean.makefiles.patch |  433 +++++++++++++++++++++++++++++++++++++++++++++++++
 clean.rmtmp.patch     |    9 +
 clean.spec            |  262 ++++++++++++++++++++++++++++++
 sources               |    2 +
 10 files changed, 1502 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..88d104e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/clean2.4_64_boot.tar.gz
+/clean2.4_boot.tar.gz
diff --git a/clean.32bit.patch b/clean.32bit.patch
new file mode 100644
index 0000000..393aca2
--- /dev/null
+++ b/clean.32bit.patch
@@ -0,0 +1,377 @@
+--- data/ArgEnv/Makefile	2012-06-29 20:06:06.310852833 +0200
++++ data/ArgEnv/Makefile	2012-06-29 20:05:23.923688003 +0200
+@@ -11,7 +11,7 @@ printenv : printenv.o ArgEnv.o ArgEnvC.o
+ 	$(CLM) -b -nt printenv -o printenv
+ 
+ ArgEnvC.o : ArgEnvC.c
+-	$(CC) -Wall -pedantic -O $(CFLAGS) -c ArgEnvC.c
++	$(CC) -Wall -pedantic -march=i686 -m32 -O $(CFLAGS) -c ArgEnvC.c
+ 	mkdir -p "Clean System Files"
+ 	cp ArgEnvC.o "Clean System Files/ArgEnvC.o"
+ 
+--- src/CodeGenerator/Makefile.linux	2012-06-29 20:06:06.311852824 +0200
++++ src/CodeGenerator/Makefile.linux	2012-06-29 20:06:26.156648034 +0200
+@@ -4,19 +4,21 @@ CC = gcc
+ OBJECTS = cg.o cgcalc.o cgcode.o cginput.o cginstructions.o \
+ 	cglin.o cgopt.o cgias.o cgiwas.o cgstack.o
+ 
++codegen: cg
++
+ objects:
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cg.c -o cg.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgcalc.c -o cgcalc.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgcode.c -o cgcode.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cginput.c -o cginput.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cginstructions.c -o cginstructions.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cglin.c -o cglin.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgopt.c -o cgopt.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgias.c -o cgias.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgiwas.c -o cgiwas.o
+-	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgstack.c -o cgstack.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cg.c -o cg.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgcalc.c -o cgcalc.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgcode.c -o cgcode.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cginput.c -o cginput.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cginstructions.c -o cginstructions.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cglin.c -o cglin.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgopt.c -o cgopt.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgias.c -o cgias.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgiwas.c -o cgiwas.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cgstack.c -o cgstack.o
+ 
+-cg: $(OBJECTS)
++cg: objects
+ 	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer $(CFLAGS) -s $(OBJECTS) -o $@ 
+ 
+ clean:
+--- src/compiler/backendC/CleanCompilerSources/Makefile	2012-06-29 20:06:06.312852814 +0200
++++ src/compiler/backendC/CleanCompilerSources/Makefile	2012-06-29 20:05:23.924687991 +0200
+@@ -17,30 +17,30 @@ backend.a: objects $(OBJECTS)
+ 	$(RANLIB) backend.a
+ 
+ objects:
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backend.c -o backend.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backendsupport.c -o backendsupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) buildtree.c -o buildtree.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checker_2.c -o checker_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checksupport.c -o checksupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) cocl.c -o cocl.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen1.c -o codegen1.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen2.c -o codegen2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen3.c -o codegen3.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen.c -o codegen.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comparser_2.c -o comparser_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) compiler.c -o compiler.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comsupport.c -o comsupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) dbprint.c -o dbprint.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) instructions.c -o instructions.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) optimisations.c -o optimisations.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) result_state_database.c -o result_state_database.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) sa.c -o sa.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) scanner_2.c -o scanner_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) settings.c -o settings.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) unix_io.c -o unix_io.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) statesgen.c -o statesgen.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) typeconv_2.c -o typeconv_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) version.c -o version.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) backend.c -o backend.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) backendsupport.c -o backendsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) buildtree.c -o buildtree.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) checker_2.c -o checker_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) checksupport.c -o checksupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) cocl.c -o cocl.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) codegen1.c -o codegen1.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) codegen2.c -o codegen2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) codegen3.c -o codegen3.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) codegen.c -o codegen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) comparser_2.c -o comparser_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) compiler.c -o compiler.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) comsupport.c -o comsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) dbprint.c -o dbprint.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) instructions.c -o instructions.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) optimisations.c -o optimisations.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) result_state_database.c -o result_state_database.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) sa.c -o sa.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) scanner_2.c -o scanner_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) settings.c -o settings.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) unix_io.c -o unix_io.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) statesgen.c -o statesgen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) typeconv_2.c -o typeconv_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c -march=i686 -m32 $(CFLAGS) version.c -o version.o
+--- src/compiler/main/Unix/Makefile	2012-06-29 20:06:06.312852814 +0200
++++ src/compiler/main/Unix/Makefile	2012-06-29 20:05:23.925687981 +0200
+@@ -11,11 +11,11 @@ Clean\ System\ Files:
+ 	mkdir -p "Clean System Files"
+ 
+ Clean\ System\ Files/cDirectory.o : cDirectory.c
+-	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c cDirectory.c -o "Clean System Files/cDirectory.o"
++	$(CC) -pedantic -Wall -W -O -march=i686 -m32 $(CFLAGS) -c cDirectory.c -o "Clean System Files/cDirectory.o"
+ 
+ Clean\ System\ Files/ipc_c.o : ipc.c
+-	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c ipc.c -o "Clean System Files/ipc_c.o"
++	$(CC) -pedantic -Wall -W -O -march=i686 -m32 $(CFLAGS) -c ipc.c -o "Clean System Files/ipc_c.o"
+ 
+ Clean\ System\ Files/set_return_code_c.o : set_return_code_c.c
+-	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c set_return_code_c.c -o "Clean System Files/set_return_code_c.o"
++	$(CC) -pedantic -Wall -W -O -march=i686 -m32 $(CFLAGS) -c set_return_code_c.c -o "Clean System Files/set_return_code_c.o"
+ 
+--- src/libraries/ArgEnvUnix/Makefile	2012-06-29 20:06:06.313852802 +0200
++++ src/libraries/ArgEnvUnix/Makefile	2012-06-29 20:05:23.925687981 +0200
+@@ -11,7 +11,7 @@ printenv : printenv.o ArgEnv.o ArgEnvC.o
+ 	$(CLM) -b -nt printenv -o printenv
+ 
+ ArgEnvC.o : ArgEnvC.c
+-	$(CC) -Wall -pedantic -O $(CFLAGS) -c ArgEnvC.c
++	$(CC) -Wall -pedantic -O -march=i686 -m32 $(CFLAGS) -c ArgEnvC.c
+ 	mkdir -p "Clean System Files"
+ 	cp ArgEnvC.o "Clean System Files/ArgEnvC.o"
+ 
+--- src/Makefile	2011-12-21 13:02:06.000000000 +0100
++++ src/Makefile	2012-06-29 20:05:23.926687970 +0200
+@@ -10,7 +10,7 @@ all: ../StdEnv/Clean\ System\ Files/_sta
+ RuntimeSystem/_startup.o:
+ 	cd RuntimeSystem ; make -f Makefile.linux all
+ 
+-RuntimeSystem/_startupProfile.o:
++RuntimeSystem/_startupProfile.o: RuntimeSystem/_startup.o
+ 	cd RuntimeSystem ; make -f Makefileprofile.linux all
+ 
+ ../StdEnv/Clean\ System\ Files/_system.o: ../exe/cg
+@@ -19,7 +19,7 @@ RuntimeSystem/_startupProfile.o:
+ ../exe/cg: CodeGenerator/cg
+ 	cp CodeGenerator/cg ../exe/cg
+ 
+-CodeGenerator/cg:
++CodeGenerator/cg: ../StdEnv/Clean\ System\ Files/_startup.o ../StdEnv/Clean\ System\ Files/_startupProfile.o ../exe/cg ../StdEnv/Clean\ System\ Files/_system.o
+ 	cd CodeGenerator; \
+ 	$(MAKE) -f Makefile.linux
+ 
+@@ -32,23 +32,25 @@ tools/clm/patch_bin:
+ 
+ ../bin/clm: tools/clm/clm
+ 	cp tools/clm/clm ../bin/clm
++	../bin/patch_bin ../bin/clm LDARGS "-march=i686 -m32"
+ 	../bin/patch_bin ../bin/clm CLEANLIB $(CWD)/../exe
+ 	../bin/patch_bin ../bin/clm CLEANPATH $(CWD)/../StdEnv
+ 
+-tools/clm/clm:
++tools/clm/clm: ../exe/cg
+ 	cd tools/clm; \
+ 	$(MAKE) -f Makefile.linux
+ 
+-tools/clm/clms:
++tools/clm/clms: ../exe/cg
+ 	cd tools/clm; \
+ 	$(MAKE) -f Makefile.linux clms
++	../bin/patch_bin tools/clm/clms LDARGS "-march=i686 -m32"
+ 	../bin/patch_bin tools/clm/clms CLEANLIB $(CWD)/../exe
+ 	../bin/patch_bin tools/clm/clms CLEANPATH $(CWD)/../StdEnv
+ 
+-libraries/ArgEnvUnix/ArgEnvC.o:
++libraries/ArgEnvUnix/ArgEnvC.o: tools/clm/clms tools/clm/clm
+ 	cd libraries/ArgEnvUnix; make ArgEnvC.o
+ 
+-compiler/main/Unix/set_return_code_c.o:
++compiler/main/Unix/set_return_code_c.o: tools/clm/clms tools/clm/clm
+ 	cd compiler/main/Unix; make all
+ 
+ ../exe/linker: tools/elf_linker/linker
+@@ -65,7 +67,7 @@ tools/elf_linker/linker: libraries/ArgEn
+ ../exe/cocl: compiler/cocl
+ 	cp compiler/cocl ../exe/cocl
+ 
+-compiler/cocl: libraries/ArgEnvUnix/ArgEnvC.o compiler/main/Unix/set_return_code_c.o
++compiler/cocl: ../exe/linker libraries/ArgEnvUnix/ArgEnvC.o compiler/main/Unix/set_return_code_c.o
+ 	cd compiler; \
+ 	cd backendC/CleanCompilerSources; make;  cd ../..; \
+ 	../../bin/clm -O _system; \
+@@ -82,7 +84,8 @@ compiler/cocl: libraries/ArgEnvUnix/ArgE
+ ../bin/htoclean: tools/htoclean/htoclean
+ 	cp tools/htoclean/htoclean ../bin/htoclean
+ 
+-tools/htoclean/htoclean:
++tools/htoclean/htoclean: compiler/cocl
++	sleep 1
+ 	cd tools/htoclean/htoclean\ source\ code; \
+ 	../../../../bin/clm -I ../../../libraries/ArgEnvUnix -l ../../../libraries/ArgEnvUnix/ArgEnvC.o -h 4m -nt -nr -I unix htoclean -o ../htoclean
+ 
+--- src/RuntimeSystem/Makefile.linux	2012-06-29 20:06:06.313852802 +0200
++++ src/RuntimeSystem/Makefile.linux	2012-06-29 20:05:23.926687970 +0200
+@@ -4,7 +4,8 @@ ODIR = ./
+ CC = gcc
+ LD = ld
+ 
+-LDFLAGS +=
++LDFLAGS += -melf_i386
++ASFLAGS += --32 -march=i686
+ 
+ all: $(ODIR)_startup.o
+ 
+@@ -13,22 +14,22 @@ $(ODIR)_startup.o: $(ODIR)istartup.o $(O
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -O -ffunction-sections -fdata-sections $(SDIR)scon.c -S -o $(ODIR)scon.s
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -march=i686 -m32 $(CFLAGS) -O -ffunction-sections -fdata-sections $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+-	as $(ODIR)scon.s -o $(ODIR)scon.o
++	as $(ASFLAGS) $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -c -O -ffunction-sections -fdata-sections -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -march=i686 -m32 $(CFLAGS) -c -O -ffunction-sections -fdata-sections -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+ 
+ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -march=i686 -m32 $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+-	as $(DEFINES_A) $(ODIR)istartup.a -o $(ODIR)istartup.o
++	as $(ASFLAGS) $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -march=i686 -m32 $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+-	as $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
++	as $(ASFLAGS) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+--- src/RuntimeSystem/Makefileprofile.linux	2012-06-29 20:06:06.314852790 +0200
++++ src/RuntimeSystem/Makefileprofile.linux	2012-06-29 20:05:23.927687962 +0200
+@@ -2,38 +2,39 @@
+ SDIR = ./
+ ODIR = ./
+ 
+-LDFLAGS += 
++LDFLAGS += -melf_i386
++ASFLAGS += --32 -march=i686
+ 
+ all: $(ODIR)_startupProfile.o
+ 
+ $(ODIR)_startupProfile.o: $(ODIR)istartup.o $(ODIR)ifileIO3.o $(ODIR)scon.o $(ODIR)ufileIO2.o $(ODIR)iprofile.o $(ODIR)uwrite_heap.o
+-	ld -r -o $(ODIR)_startupProfile.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)iprofile.o uwrite_heap.o
++	ld $(LDFLAGS) -r -o $(ODIR)_startupProfile.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)iprofile.o uwrite_heap.o
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -O $(SDIR)scon.c -S -o $(ODIR)scon.s
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE -march=i686 -m32 $(CFLAGS) -O $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+-	as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
++	as $(ASFLAGS) $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -c -O -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE -march=i686 -m32 $(CFLAGS) -c -O -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+ 
+ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE -march=i686 -m32 $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+-	as $(DEFINES_A) $(ODIR)istartup.a -o $(ODIR)istartup.o
++	as $(ASFLAGS) $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE -march=i686 -m32 $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+-	as $(DEFINES_A) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
++	as $(ASFLAGS) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+ 
+ $(ODIR)iprofile.o: $(SDIR)iprofile.s
+ 	cp $(ODIR)iprofile.s $(ODIR)iprofile.c
+-	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)iprofile.c > $(ODIR)iprofile.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE -march=i686 -m32 $(CFLAGS) -E $(ODIR)iprofile.c > $(ODIR)iprofile.t
+ 	sed s/@// < $(SDIR)/iprofile.t > $(ODIR)iprofile.a
+-	as $(DEFINES_A) $(ODIR)iprofile.a -o $(ODIR)iprofile.o
++	as $(ASFLAGS) $(ODIR)iprofile.a -o $(ODIR)iprofile.o
+ 
+--- src/RuntimeSystem/Makefiletrace.linux	2012-06-29 20:06:06.314852790 +0200
++++ src/RuntimeSystem/Makefiletrace.linux	2012-06-29 20:05:23.928687956 +0200
+@@ -5,18 +5,20 @@ ODIR = ./
+ CC = gcc
+ LD = ld
+ 
++LDFLAGS = "-melf_i386"
++ASFLAGS = "--32 -march=i686"
+ 
+ all: $(ODIR)_startupTrace.o
+ 
+ $(ODIR)_startupTrace.o: $(ODIR)istartup.o $(ODIR)ifileIO3.o $(ODIR)scon.o $(ODIR)ufileIO2.o $(ODIR)itrace.o $(ODIR)uwrite_heap.o
+-	$(LD) -r -o $(ODIR)_startupTrace.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)itrace.o uwrite_heap.o
++	$(LD) $(LDFLAGS) -r -o $(ODIR)_startupTrace.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)itrace.o uwrite_heap.o
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+ 	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -O $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+-	as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
++	as $(ASFLAGS) $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+ 	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -c -O -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+@@ -25,17 +27,17 @@ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+ 	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+-	as $(ODIR)istartup.a -o $(ODIR)istartup.o
++	as $(ASFLAGS) $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+ 	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS)) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+-	as $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
++	as $(ASFLAGS) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+ 
+ $(ODIR)itrace.o: $(SDIR)itrace.s
+ 	cp $(ODIR)itrace.s $(ODIR)itrace.c
+ 	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)itrace.c > $(ODIR)itrace.t
+ 	sed s/@// < $(SDIR)/itrace.t > $(ODIR)itrace.a
+-	as $(ODIR)itrace.a -o $(ODIR)itrace.o
++	as $(ASFLAGS) $(ODIR)itrace.a -o $(ODIR)itrace.o
+ 
+--- src/tools/clm/Makefile.linux	2012-06-29 20:06:06.315852777 +0200
++++ src/tools/clm/Makefile.linux	2012-06-29 20:05:23.928687956 +0200
+@@ -4,7 +4,7 @@ CPPFLAGS += -DGNU_C -DLINUX -DLINUX_ELF
+ all: clm patch_bin
+ 
+ clm: clm.o cachingcompiler.o
+-	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clm.o cachingcompiler.o -o clm
++	$(CC) -O -pedantic -Wall -W -march=i686 -m32 $(CFLAGS) -s clm.o cachingcompiler.o -o clm
+ #	./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+ #	./patch_bin clm CLEANPATH .:$(HOME)/Clean2/stdenv:$(HOME)/Clean2/iolib
+ 
+@@ -14,17 +14,17 @@ clm.o: clm.c cachingcompiler.h
+ #	gcc -pedantic -Wall -c -DGNU_C -DSOLARIS -O clm.c # -mcpu=ppc603 clm.c
+ 
+ patch_bin: patch_bin.o
+-	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s patch_bin.o -o patch_bin
++	$(CC) -O -pedantic -Wall -W -march=i686 -m32 $(CFLAGS) -s patch_bin.o -o patch_bin
+  
+ patch_bin.o: patch_bin.c
+  
+ clms: clms.o cachingcompiler.o
+-	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
++	$(CC) -O -pedantic -Wall -W -march=i686 -m32 $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+ #       ./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+  
+ clms: clms.o cachingcompiler.o
+-	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
++	$(CC) -O -pedantic -Wall -W -march=i686 -m32 $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+  
+ clms.o: clm.c cachingcompiler.h
+-	$(CC) -O -pedantic -Wall -W $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
++	$(CC) -O -pedantic -Wall -W -march=i686 -m32 $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
+  
diff --git a/clean.64bit.patch b/clean.64bit.patch
new file mode 100644
index 0000000..c188cbf
--- /dev/null
+++ b/clean.64bit.patch
@@ -0,0 +1,149 @@
+--- src/compiler/backendC/CleanCompilerSources/Makefile.linux64	2012-06-29 21:43:41.946213761 +0200
++++ src/compiler/backendC/CleanCompilerSources/Makefile.linux64	2012-06-29 21:41:54.099871998 +0200
+@@ -17,30 +17,30 @@ backend.a: objects $(OBJECTS)
+ 	$(RANLIB) backend.a
+ 
+ objects:
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backend.c -o backend.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backendsupport.c -o backendsupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) buildtree.c -o buildtree.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checker_2.c -o checker_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checksupport.c -o checksupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) cocl.c -o cocl.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen1.c -o codegen1.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen2.c -o codegen2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen3.c -o codegen3.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen.c -o codegen.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comparser_2.c -o comparser_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) compiler.c -o compiler.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comsupport.c -o comsupport.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) dbprint.c -o dbprint.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) instructions.c -o instructions.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) optimisations.c -o optimisations.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) result_state_database.c -o result_state_database.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) sa.c -o sa.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) scanner_2.c -o scanner_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) settings.c -o settings.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) unix_io.c -o unix_io.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) statesgen.c -o statesgen.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) typeconv_2.c -o typeconv_2.o
+-	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) version.c -o version.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) backend.c -o backend.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) backendsupport.c -o backendsupport.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) buildtree.c -o buildtree.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) checker_2.c -o checker_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) checksupport.c -o checksupport.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) cocl.c -o cocl.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) codegen1.c -o codegen1.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) codegen2.c -o codegen2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) codegen3.c -o codegen3.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) codegen.c -o codegen.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) comparser_2.c -o comparser_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) compiler.c -o compiler.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) comsupport.c -o comsupport.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) dbprint.c -o dbprint.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) instructions.c -o instructions.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) optimisations.c -o optimisations.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) result_state_database.c -o result_state_database.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) sa.c -o sa.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) scanner_2.c -o scanner_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) settings.c -o settings.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) unix_io.c -o unix_io.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) statesgen.c -o statesgen.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) typeconv_2.c -o typeconv_2.o
++	$(CC) -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer -c $(CFLAGS) version.c -o version.o
+--- src/Makefile	2011-12-21 13:08:24.000000000 +0100
++++ src/Makefile	2012-06-29 21:40:25.236387538 +0200
+@@ -13,10 +13,10 @@ all: ../StdEnv/Clean\ System\ Files/_sta
+ RuntimeSystem/linux64/_startup.o:
+ 	cd RuntimeSystem ; ./remove_tmp_files_linux ; ./make_astartup.csh
+ 
+-RuntimeSystem/linux64Profile/_startupProfile.o:
++RuntimeSystem/linux64Profile/_startupProfile.o: RuntimeSystem/linux64/_startup.o
+ 	cd RuntimeSystem ; ./remove_tmp_files_linux ; ./make_astartupProfile.csh
+ 
+-RuntimeSystem/linux64Trace/_startupTrace.o:
++RuntimeSystem/linux64Trace/_startupTrace.o: RuntimeSystem/linux64Profile/_startupProfile.o RuntimeSystem/linux64/_startup.o
+ 	cd RuntimeSystem ; ./remove_tmp_files_linux ; ./make_astartupTrace.csh
+ 
+ ../StdEnv/Clean\ System\ Files/_system.o: ../exe/cg
+@@ -25,7 +25,7 @@ RuntimeSystem/linux64Trace/_startupTrace
+ ../exe/cg: CodeGenerator/cg
+ 	cp CodeGenerator/cg ../exe/cg
+ 
+-CodeGenerator/cg:
++CodeGenerator/cg: ../StdEnv/Clean\ System\ Files/_startup.o ../StdEnv/Clean\ System\ Files/_startupProfile.o ../StdEnv/Clean\ System\ Files/_startupTrace.o ../exe/cg ../StdEnv/Clean\ System\ Files/_system.o
+ 	cd CodeGenerator; \
+ 	$(MAKE) -f Makefile.linux64
+ 
+@@ -41,20 +41,20 @@ tools/clm/patch_bin:
+ 	../bin/patch_bin ../bin/clm CLEANLIB $(CWD)/../exe
+ 	../bin/patch_bin ../bin/clm CLEANPATH $(CWD)/../StdEnv
+ 
+-tools/clm/clm:
++tools/clm/clm: ../exe/cg
+ 	cd tools/clm; \
+ 	$(MAKE) -f Makefile.linux64 clm
+ 
+-tools/clm/clms:
++tools/clm/clms: ../exe/cg
+ 	cd tools/clm; \
+ 	$(MAKE) -f Makefile.linux64 clms
+ 	../bin/patch_bin tools/clm/clms CLEANLIB $(CWD)/../exe
+ 	../bin/patch_bin tools/clm/clms CLEANPATH $(CWD)/../StdEnv
+ 
+-libraries/ArgEnvUnix/ArgEnvC.o:
++libraries/ArgEnvUnix/ArgEnvC.o: tools/clm/clms tools/clm/clm
+ 	cd libraries/ArgEnvUnix; make ArgEnvC.o
+ 
+-compiler/main/Unix/set_return_code_c.o:
++compiler/main/Unix/set_return_code_c.o: tools/clm/clms tools/clm/clm
+ 	cd compiler/main/Unix; make all
+ 
+ ../exe/linker: tools/elf_linker/linker
+@@ -69,7 +69,7 @@ tools/elf_linker/linker: libraries/ArgEn
+ ../exe/cocl: compiler/cocl
+ 	cp compiler/cocl ../exe/cocl
+ 
+-compiler/cocl: libraries/ArgEnvUnix/ArgEnvC.o compiler/main/Unix/set_return_code_c.o
++compiler/cocl: ../exe/linker libraries/ArgEnvUnix/ArgEnvC.o compiler/main/Unix/set_return_code_c.o
+ 	cd compiler; \
+ 	cd backendC/CleanCompilerSources; make -f Makefile.linux64;  cd ../..; \
+ 	../../bin/clm -O _system; \
+@@ -86,7 +86,8 @@ compiler/cocl: libraries/ArgEnvUnix/ArgE
+ ../bin/htoclean: tools/htoclean/htoclean
+ 	cp tools/htoclean/htoclean ../bin/htoclean
+ 
+-tools/htoclean/htoclean:
++tools/htoclean/htoclean: compiler/cocl
++	sleep 1
+ 	cd tools/htoclean/htoclean\ source\ code; \
+ 	../../../../bin/clm -I ../../../libraries/ArgEnvUnix -l ../../../libraries/ArgEnvUnix/ArgEnvC.o -h 4m -nt -nr -I unix htoclean -o ../htoclean
+ 
+--- src/tools/clm/Makefile.linux64	2012-06-29 21:43:41.949213739 +0200
++++ src/tools/clm/Makefile.linux64	2012-06-29 21:40:25.236387538 +0200
+@@ -2,7 +2,7 @@ CC=gcc
+ CPPFLAGS += -DGNU_C -DLINUX -DLINUX_ELF -DI486 -DA_64
+ 
+ clm: clm.o cachingcompiler.o
+-	$(CC) -pedantic -Wall -W $(CFLAGS) clm.o cachingcompiler.o -o clm
++	$(CC) -DG_A64 -pedantic -Wall -W $(CFLAGS) clm.o cachingcompiler.o -o clm
+ #	./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+ #	./patch_bin clm CLEANPATH .:$(HOME)/Clean2/stdenv:$(HOME)/Clean2/iolib
+ 
+@@ -13,7 +13,7 @@ clm.o: clm.c cachingcompiler.h
+ #	gcc -pedantic -Wall -c -DGNU_C -DSOLARIS -O clm.c # -mcpu=ppc603 clm.c
+  
+ clms: clms.o cachingcompiler.o
+-	$(CC) -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
++	$(CC) -DG_A64 -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+  
+ clms.o: clm.c cachingcompiler.h
+-	$(CC) -pedantic -Wall -W $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
++	$(CC) -DG_A64 -pedantic -Wall -W $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
diff --git a/clean.clmman.patch b/clean.clmman.patch
new file mode 100644
index 0000000..b2a14c4
--- /dev/null
+++ b/clean.clmman.patch
@@ -0,0 +1,14 @@
+--- man/man1/clm.1	2012-06-19 19:11:31.992911969 +0200
++++ man/man1/clm.1	2012-06-19 19:11:40.573916411 +0200
+@@ -44,9 +44,9 @@
+ show types of functions for which not all strictness information has been exported.
+ .IP -ns
+ don't strip the application.
+-.IP -l object_file
++.IP -l\ object_file
+ include the object_file.
+-.IP -sl link_options_file
++.IP -sl\ link_options_file
+ use link_options_file (SEE LINK OPTIONS FILES)
+ .SH  APPLICATION OPTIONS
+ .IP -h\ size
diff --git a/clean.htoclean.1 b/clean.htoclean.1
new file mode 100644
index 0000000..d7c2dec
--- /dev/null
+++ b/clean.htoclean.1
@@ -0,0 +1,10 @@
+.TH man 1 "19 June 2012" "2.4" "htoclean man page"
+.SH NAME
+htoclean \- generate a Clean module for the specified C header file
+.SH SYNOPSIS
+htoclean [h_file_name]
+.SH DESCRIPTION
+Generates a .icl and .dcl file for a c header file.
+This makes it possible to call C functions from within a Clean program.
+.SH SEE ALSO
+clm(1)
diff --git a/clean.localint.patch b/clean.localint.patch
new file mode 100644
index 0000000..02f8ebb
--- /dev/null
+++ b/clean.localint.patch
@@ -0,0 +1,244 @@
+--- src/CodeGenerator/cg.c	2011-02-01 15:13:28.000000000 +0100
++++ src/CodeGenerator/cg.c	2012-07-02 13:50:41.416293751 +0200
+@@ -621,6 +621,8 @@ extern int intel_asm;
+ extern int sse_128;
+ #endif
+ 
++char _local_int_files[25] = "#$@LOCALINT  %*&N";
++
+ #ifdef MAIN_CLM
+ # if !(defined (__MWERKS__) && defined (__cplusplus))
+ #  ifdef CG_PPC_XO
+@@ -752,7 +754,33 @@ int main (int argc,char **argv)
+ 		abc_file_name=(char*)memory_allocate (file_name_length+5);
+ 		strcpy (abc_file_name,file_name);
+ 		strcat (abc_file_name,".abc");
+-		
++	
++		if(_local_int_files[16] == 'Y')
++		{
++			//Override file_name so object_file_name and assembly_file_name come in `pwd`/Clean System Files
++			char *p,*after_last_slash;
++
++                        after_last_slash=NULL;
++
++                        p=file_name;
++			char *old_file_name = file_name;
++			file_name = (char*)malloc(sizeof(char) * 512);
++                        while (*p)
++                        	if (*p++=='/')
++                        		after_last_slash=p;
++
++			//filename is in after_last_slash
++			if(after_last_slash == NULL)
++			{
++				after_last_slash = old_file_name;
++			}
++
++			getcwd(file_name, 500);
++			strcat (file_name, "/Clean System Files/");
++			strcat (file_name, after_last_slash);
++			file_name_length = strlen(file_name);
++		}
++	
+ 		object_file_name_s=(char*)memory_allocate (file_name_length+6);
+ 		strcpy (object_file_name_s,file_name);
+ 
+--- src/compiler/backendC/CleanCompilerSources/unix_io.c	2011-05-10 15:11:52.000000000 +0200
++++ src/compiler/backendC/CleanCompilerSources/unix_io.c	2012-07-02 13:50:41.416293751 +0200
+@@ -217,6 +217,8 @@ static Bool findfilepath (char *fname, F
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ 
++char _local_int_files[25] = "#$@LOCALINT  %*&N";
++
+ File FOpen (char *wname, FileKind kind, char *mode)
+ {
+ 	char path[MAXPATHLEN];
+@@ -236,33 +238,60 @@ File FOpen (char *wname, FileKind kind,
+ 			res=findfilepath (wname,iclFile,mode,path);
+ 
+ 		if (res){
+-			char *p,*after_last_slash;
++			if(_local_int_files[16] == 'Y')
++			{
++	                        char *cwd = malloc(sizeof(char) * 512);
++
++	                      	getcwd(cwd, 500);
++
++	                        if (cwd==NULL)
++	                                return NULL;
+ 
+-			after_last_slash=NULL;
++				strcpy (cwd, "/");
++
++	                        if (use_clean_system_files_folder){
++	                                strcpy (cwd,"Clean System Files");
++
++	                                if (access (cwd,F_OK)!=0){
++	                                        if (mkdir (cwd,0777)!=0)
++	                                                return NULL;
++	                                }
++	
++	                                strcat (cwd,"/");
++	                                strcat (cwd,wname);
++	                        } else
++	                                strcpy (cwd,wname);
++	                        strcat (cwd,GetFileExtension (kind));
++				return fopen(cwd, mode);
++			} else {	//Non-local
++				char *p,*after_last_slash;
++
++				after_last_slash=NULL;
++
++				p=path;
++				while (*p)
++					if (*p++=='/')
++						after_last_slash=p;
++
++				if (after_last_slash==NULL)
++					after_last_slash=path;
++
++				if (use_clean_system_files_folder){
++					strcpy (after_last_slash,"Clean System Files");
++
++					if (access (path,F_OK)!=0){
++						if (mkdir (path,0777)!=0)
++							return NULL;
++					}
++
++					strcat (after_last_slash,"/");
++					strcat (after_last_slash,wname);
++				} else
++					strcpy (after_last_slash,wname);
++				strcat (after_last_slash,GetFileExtension (kind));
++				return fopen(path, mode);
++			}
+ 
+-			p=path;
+-			while (*p)
+-				if (*p++=='/')
+-					after_last_slash=p;
+-
+-			if (after_last_slash==NULL)
+-				after_last_slash=path;
+-
+-			if (use_clean_system_files_folder){
+-				strcpy (after_last_slash,"Clean System Files");
+-
+-				if (access (path,F_OK)!=0){
+-					if (mkdir (path,0777)!=0)
+-						return NULL;
+-				}
+-
+-				strcat (after_last_slash,"/");
+-				strcat (after_last_slash,wname);
+-			} else
+-				strcpy (after_last_slash,wname);
+-			strcat (after_last_slash,GetFileExtension (kind));
+-			
+-			return fopen (path,mode);
+ 		} else
+ 			return NULL;
+ 	}	
+--- src/tools/clm/clm.c	2011-12-02 12:58:57.000000000 +0100
++++ src/tools/clm/clm.c	2012-07-02 13:53:17.183324398 +0200
+@@ -35,6 +35,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <dirent.h>
+ 
+ #if defined(I486) || defined (SOLARIS) || defined (LINUX)
+ #	include <unistd.h>
+@@ -184,6 +185,10 @@
+ char Mcrt1_file_name [PATH_NAME_STRING_SIZE] = "/lib/Mcrt1.o";
+ #endif
+ 
++char _local_int[25] = "#$@LOCALINT  %*&N";
++char _clean_path_list_root[PATH_LIST_STRING_SIZE] = "#$@PATHLISTRT%*&.";
++#define clean_path_list_root (&_clean_path_list_root[16])
++
+ /* default options of cocl */
+ 
+ #define DEFAULT_WARNING 				1
+@@ -1068,6 +1073,18 @@ static int silent=0;
+ 	{
+ 		char *p,*last_colon;
+ 
++		if((_local_int[16] == 'Y') && ((strncmp(file_name, "_SystemEnum", strlen("_SystemEnum")) == 0) || (strncmp(file_name, "_SystemArray", strlen("_SystemArray")) == 0) || (file_name[0] != '_')))	//_-files cannot be built again
++		{
++			getcwd(path, 500);
++			strcat(path, "/");
++#ifndef NO_CLEAN_SYSTEM_FILES_FOLDERS
++			strcat(path, "Clean System Files/");
++#endif
++			strcat(path, file_name);
++			strcat(path, extension);
++			return;
++		}
++
+ 		last_colon=path;
+ 		p=path;
+ 		while (*p){
+@@ -1192,8 +1209,16 @@ static void get_paths (void)
+ 	clean_abc_path=NULL;
+ 	clean_o_path=NULL;
+ #else
+-	clean_abc_path=getenv ("CLEANABCPATH");
+-	clean_o_path=getenv ("CLEANOPATH");
++       if(_local_int[16] == 'Y')
++       {
++               clean_abc_path = malloc(sizeof(char) * 512);
++               clean_o_path = malloc(sizeof(char) * 512);
++               getcwd(clean_abc_path, 500);
++               getcwd(clean_abc_path, 500);
++       } else {
++               clean_abc_path=getenv ("CLEANABCPATH");
++               clean_o_path=getenv ("CLEANOPATH");
++       }
+ #endif
+ 
+ #if defined (OS2) && !defined (OMF)
+@@ -1240,8 +1265,10 @@ static int get_abc_time (P_NODE project_
+ 		{
+ 		struct stat stat_buffer;
+ 		
+-		if (!find_clean_system_file (project_node->pro_fname,".abc",file_name,clean_abc_path))
++		if (!find_clean_system_file (project_node->pro_fname,".abc",file_name,clean_abc_path)){
++			project_node->pro_no_abc_file=1;
+ 			return 0;
++		}
+ 	
+ 		if (stat (file_name,&stat_buffer)<0){
+ 			project_node->pro_no_abc_file=1;
+@@ -4325,6 +4352,29 @@ int main (int argc,char **argv)
+ 	last_export_file=NULL;
+ 
+ 	get_paths();
++
++       //Append clean_path_list_root contents to _clean_path_list with strcat after checking all directories
++	if(clean_path_list_root[0] != '.')
++	{
++		DIR *root_dir = opendir(clean_path_list_root);
++		if(root_dir)
++		{
++			struct dirent *dir;
++			while(dir = readdir(root_dir))
++			{
++				if((dir->d_name != ".") && (dir->d_name != ".."))
++				{
++					if (clean_path_list[0]!='\0')
++						strcat (clean_path_list,":");
++					strcat (clean_path_list,clean_path_list_root);
++					strcat (clean_path_list,"/");
++					strcat (clean_path_list,dir->d_name);
++				}
++			}
++			closedir(root_dir);
++		}
++	}
++
+ 	
+ 	for (arg_n=1; arg_n<argc && argv[arg_n][0]=='-'; ++arg_n){
+ 		char *argument,*s;
diff --git a/clean.makefiles.patch b/clean.makefiles.patch
new file mode 100644
index 0000000..bd5afc9
--- /dev/null
+++ b/clean.makefiles.patch
@@ -0,0 +1,433 @@
+--- data/ArgEnv/Makefile	2011-12-21 12:56:44.000000000 +0100
++++ data/ArgEnv/Makefile	2012-06-27 16:24:42.774773701 +0200
+@@ -6,13 +6,12 @@
+ CLM=clm
+ 
+ CC=gcc
+-COPTIONS=-Wall -pedantic -O
+ 
+ printenv : printenv.o ArgEnv.o ArgEnvC.o
+ 	$(CLM) -b -nt printenv -o printenv
+ 
+ ArgEnvC.o : ArgEnvC.c
+-	$(CC) $(COPTIONS) -c ArgEnvC.c
++	$(CC) -Wall -pedantic -O $(CFLAGS) -c ArgEnvC.c
+ 	mkdir -p "Clean System Files"
+ 	cp ArgEnvC.o "Clean System Files/ArgEnvC.o"
+ 
+--- src/CodeGenerator/Makefile.linux	2003-09-25 14:51:03.000000000 +0200
++++ src/CodeGenerator/Makefile.linux	2012-06-29 13:34:56.442141936 +0200
+@@ -1,12 +1,23 @@
+ 
+ CC = gcc
+-CFLAGS = -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer
+ 
+ OBJECTS = cg.o cgcalc.o cgcode.o cginput.o cginstructions.o \
+ 	cglin.o cgopt.o cgias.o cgiwas.o cgstack.o
+ 
++objects:
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cg.c -o cg.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgcalc.c -o cgcalc.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgcode.c -o cgcode.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cginput.c -o cginput.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cginstructions.c -o cginstructions.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cglin.c -o cglin.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgopt.c -o cgopt.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgias.c -o cgias.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgiwas.c -o cgiwas.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer -c $(CFLAGS) cgstack.c -o cgstack.o
++
+ cg: $(OBJECTS)
+-	gcc -s $(OBJECTS) -o $@ 
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer $(CFLAGS) -s $(OBJECTS) -o $@ 
+ 
+ clean:
+ 	rm $(OBJECTS)
+--- src/CodeGenerator/Makefile.linux64	2006-11-07 13:10:33.000000000 +0100
++++ src/CodeGenerator/Makefile.linux64	2012-06-29 13:34:56.442141936 +0200
+@@ -1,12 +1,25 @@
+ 
+ CC = gcc
+-CFLAGS = -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer
+ 
+ OBJECTS = cg.o cgcalc.o cgcode.o cginput.o cginstructions.o \
+ 	cglin.o cgopt.o cgaas.o cgawas.o cgstack.o
+ 
+-cg: $(OBJECTS)
+-	gcc -s $(OBJECTS) -o $@ 
++make: cg
++
++objects:
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cg.c -o cg.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgcalc.c -o cgcalc.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgcode.c -o cgcode.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cginput.c -o cginput.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cginstructions.c -o cginstructions.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cglin.c -o cglin.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgopt.c -o cgopt.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgaas.c -o cgaas.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgawas.c -o cgawas.o
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer -c $(CFLAGS) cgstack.c -o cgstack.o
++
++cg: objects
++	$(CC) -DI486 -DGNU_C -DLINUX -DLINUX_ELF -DG_AI64 -O -fomit-frame-pointer $(CFLAGS) -s $(OBJECTS) -o cg
+ 
+ clean:
+ 	rm $(OBJECTS)
+--- src/compiler/backendC/CleanCompilerSources/Makefile	2004-06-02 13:28:50.000000000 +0200
++++ src/compiler/backendC/CleanCompilerSources/Makefile	2012-06-29 13:46:50.371407773 +0200
+@@ -1,6 +1,6 @@
+ # This is for Unix
+ CC = gcc
+-CFLAGS = -D_SUN_ -DGNU_C -O -fomit-frame-pointer
++CFLAGS += -D_SUN_ -DGNU_C -O -fomit-frame-pointer
+ AR = ar
+ RANLIB = ranlib
+ 
+@@ -12,6 +12,35 @@ OBJECTS = \
+ 	set_scope_numbers.o settings.o unix_io.o statesgen.o tcsupport_2.o \
+ 	typeconv_2.o version.o
+ 
+-backend.a: $(OBJECTS)
++backend.a: objects $(OBJECTS)
+ 	$(AR) cur backend.a $(OBJECTS)
+ 	$(RANLIB) backend.a
++
++objects:
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backend.c -o backend.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backendsupport.c -o backendsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) buildtree.c -o buildtree.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checker_2.c -o checker_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checksupport.c -o checksupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) cocl.c -o cocl.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen1.c -o codegen1.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen2.c -o codegen2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen3.c -o codegen3.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen.c -o codegen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comparser_2.c -o comparser_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) compiler.c -o compiler.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comsupport.c -o comsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) dbprint.c -o dbprint.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) instructions.c -o instructions.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) optimisations.c -o optimisations.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) result_state_database.c -o result_state_database.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) sa.c -o sa.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) scanner_2.c -o scanner_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) settings.c -o settings.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) unix_io.c -o unix_io.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) statesgen.c -o statesgen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) typeconv_2.c -o typeconv_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) version.c -o version.o
+
+--- src/compiler/backendC/CleanCompilerSources/Makefile.linux64	2011-03-18 11:47:47.000000000 +0100
++++ src/compiler/backendC/CleanCompilerSources/Makefile.linux64	2012-06-29 13:48:27.504730449 +0200
+@@ -1,6 +1,6 @@
+ # This is for linux 64
+ CC = gcc
+-CFLAGS = -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer
++CFLAGS += -D_SUN_ -DGNU_C -DG_A64 -O -fomit-frame-pointer
+ AR = ar
+ RANLIB = ranlib
+ 
+@@ -12,6 +12,35 @@ OBJECTS = \
+ 	set_scope_numbers.o settings.o unix_io.o statesgen.o tcsupport_2.o \
+ 	typeconv_2.o version.o
+ 
+-backend.a: $(OBJECTS)
++backend.a: objects $(OBJECTS)
+ 	$(AR) cur backend.a $(OBJECTS)
+ 	$(RANLIB) backend.a
++
++objects:
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backend.c -o backend.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) backendsupport.c -o backendsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) buildtree.c -o buildtree.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checker_2.c -o checker_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) checksupport.c -o checksupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) cocl.c -o cocl.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen1.c -o codegen1.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen2.c -o codegen2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen3.c -o codegen3.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) codegen.c -o codegen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comparser_2.c -o comparser_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) compiler.c -o compiler.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) comsupport.c -o comsupport.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) dbprint.c -o dbprint.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) instructions.c -o instructions.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) optimisations.c -o optimisations.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) pattern_match_2.c -o pattern_match_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) result_state_database.c -o result_state_database.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) sa.c -o sa.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) scanner_2.c -o scanner_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) set_scope_numbers.c -o set_scope_numbers.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) settings.c -o settings.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) unix_io.c -o unix_io.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) statesgen.c -o statesgen.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) tcsupport_2.c -o tcsupport_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) typeconv_2.c -o typeconv_2.o
++	$(CC) -D_SUN_ -DGNU_C -O -fomit-frame-pointer -c $(CFLAGS) version.c -o version.o
+ 
+--- src/compiler/main/Unix/Makefile	2006-05-10 16:16:01.000000000 +0200
++++ src/compiler/main/Unix/Makefile	2012-06-27 16:24:42.779773698 +0200
+@@ -1,5 +1,4 @@
+ CC=gcc
+-CFLAGS=-pedantic -Wall -W -O
+ CPPFLAGS=
+ 
+ all: cDirectory.o ipc.o set_return_code_c.o \
+@@ -12,11 +12,11 @@ Clean\ System\ Files:
+ 	mkdir -p "Clean System Files"
+ 
+ Clean\ System\ Files/cDirectory.o : cDirectory.c
+-	$(CC) -c $(CFLAGS) cDirectory.c -o "Clean System Files/cDirectory.o"
++	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c cDirectory.c -o "Clean System Files/cDirectory.o"
+ 
+ Clean\ System\ Files/ipc_c.o : ipc.c
+-	$(CC) -c $(CFLAGS) ipc.c -o "Clean System Files/ipc_c.o"
++	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c ipc.c -o "Clean System Files/ipc_c.o"
+ 
+ Clean\ System\ Files/set_return_code_c.o : set_return_code_c.c
+-	$(CC) -c $(CFLAGS) set_return_code_c.c -o "Clean System Files/set_return_code_c.o"
++	$(CC) -pedantic -Wall -W -O $(CFLAGS) -c set_return_code_c.c -o "Clean System Files/set_return_code_c.o"
+ 
+--- src/libraries/ArgEnvUnix/Makefile	2011-02-01 13:47:47.000000000 +0100
++++ src/libraries/ArgEnvUnix/Makefile	2012-06-27 16:24:42.779773698 +0200
+@@ -5,14 +5,13 @@
+ #
+ CLM=clm
+ 
+-CC=gcc
+-COPTIONS=-Wall -pedantic -O
++CC = gcc
+ 
+ printenv : printenv.o ArgEnv.o ArgEnvC.o
+ 	$(CLM) -b -nt printenv -o printenv
+ 
+ ArgEnvC.o : ArgEnvC.c
+-	$(CC) $(COPTIONS) -c ArgEnvC.c
++	$(CC) -Wall -pedantic -O $(CFLAGS) -c ArgEnvC.c
+ 	mkdir -p "Clean System Files"
+ 	cp ArgEnvC.o "Clean System Files/ArgEnvC.o"
+ 
+@@ -23,4 +23,4 @@ printenv.o : printenv.icl ArgEnv.dcl
+ 	$(CLM) -O printenv
+ 
+ cleanup :
+-	$(RM) printenv *.o *.abc
++	rm -f printenv *.o *.abc
+ 
+--- src/RuntimeSystem/Makefile.linux	2010-07-22 12:41:40.000000000 +0200
++++ src/RuntimeSystem/Makefile.linux	2012-06-27 16:24:42.779773698 +0200
+@@ -1,34 +1,34 @@
+-
+ SDIR = ./
+ ODIR = ./
+ 
+-DEFINES = -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF
+-DEFINESA = -D USE_CLIB -D LINUX -D I486 -D GNU_C -D ELF
++CC = gcc
++LD = ld
++
++LDFLAGS +=
+ 
+ all: $(ODIR)_startup.o
+ 
+ $(ODIR)_startup.o: $(ODIR)istartup.o $(ODIR)ifileIO3.o $(ODIR)scon.o $(ODIR)ufileIO2.o $(ODIR)uwrite_heap.o
+-	ld -r -o $(ODIR)_startup.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o uwrite_heap.o
++	$(LD) $(LDFLAGS) -r -o $(ODIR)_startup.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o uwrite_heap.o
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+-	$(CC) -O $(DEFINES) -ffunction-sections -fdata-sections $(SDIR)scon.c -S -o $(ODIR)scon.s
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -O -ffunction-sections -fdata-sections $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+-	as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
++	as $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+-	gcc -c -O $(DEFINES) -ffunction-sections -fdata-sections -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -c -O -ffunction-sections -fdata-sections -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+ 
+ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+-	$(CC) $(DEFINES) -E $(ODIR)istartup.c > $(ODIR)istartup.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+ 	as $(DEFINES_A) $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+-	$(CC) $(DEFINES) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+-	as $(DEFINES_A) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+-
++	as $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+--- src/RuntimeSystem/Makefileprofile.linux	2010-07-22 12:41:40.000000000 +0200
++++ src/RuntimeSystem/Makefileprofile.linux	2012-06-27 16:24:42.779773698 +0200
+@@ -2,8 +2,7 @@
+ SDIR = ./
+ ODIR = ./
+ 
+-DEFINES = -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE
+-DEFINESA = -D USE_CLIB -D LINUX -D I486 -D GNU_C -D ELF -D TIME_PROFILE -D PROFILE
++LDFLAGS += 
+ 
+ all: $(ODIR)_startupProfile.o
+ 
+@@ -12,29 +12,29 @@ $(ODIR)_startupProfile.o: $(ODIR)istartu
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+-	$(CC) -O $(DEFINES) $(SDIR)scon.c -S -o $(ODIR)scon.s
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -O $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+ 	as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+-	gcc -c -O $(DEFINES) -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -c -O -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+ 
+ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+-	$(CC) $(DEFINES) -E $(ODIR)istartup.c > $(ODIR)istartup.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+ 	as $(DEFINES_A) $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+-	$(CC) $(DEFINES) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+ 	as $(DEFINES_A) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+ 
+ $(ODIR)iprofile.o: $(SDIR)iprofile.s
+ 	cp $(ODIR)iprofile.s $(ODIR)iprofile.c
+-	$(CC) $(DEFINES) -E $(ODIR)iprofile.c > $(ODIR)iprofile.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)iprofile.c > $(ODIR)iprofile.t
+ 	sed s/@// < $(SDIR)/iprofile.t > $(ODIR)iprofile.a
+ 	as $(DEFINES_A) $(ODIR)iprofile.a -o $(ODIR)iprofile.o
+ 
+--- src/RuntimeSystem/Makefiletrace.linux	2010-07-22 12:48:47.000000000 +0200
++++ src/RuntimeSystem/Makefiletrace.linux	2012-06-27 16:24:42.779773698 +0200
+@@ -2,39 +2,40 @@
+ SDIR = ./
+ ODIR = ./
+ 
+-DEFINES = -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE
+-DEFINESA = -D USE_CLIB -D LINUX -D I486 -D GNU_C -D ELF -D TIME_PROFILE -D PROFILE
++CC = gcc
++LD = ld
++
+ 
+ all: $(ODIR)_startupTrace.o
+ 
+ $(ODIR)_startupTrace.o: $(ODIR)istartup.o $(ODIR)ifileIO3.o $(ODIR)scon.o $(ODIR)ufileIO2.o $(ODIR)itrace.o $(ODIR)uwrite_heap.o
+-	ld -r -o $(ODIR)_startupTrace.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)itrace.o uwrite_heap.o
++	$(LD) -r -o $(ODIR)_startupTrace.o $(ODIR)istartup.o $(ODIR)scon.o $(ODIR)ifileIO3.o $(ODIR)ufileIO2.o $(ODIR)itrace.o uwrite_heap.o
+ 
+ $(ODIR)scon.o: $(SDIR)scon.c
+ #	gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
+-	$(CC) -O $(DEFINES) $(SDIR)scon.c -S -o $(ODIR)scon.s
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -O $(SDIR)scon.c -S -o $(ODIR)scon.s
+ 	mv $(ODIR)scon.s $(ODIR)scon.s.copy
+ 	grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
+ 	as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
+ 
+ $(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
+-	gcc -c -O $(DEFINES) -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -c -O -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
+ 
+ $(ODIR)istartup.o: $(SDIR)istartup.s
+ 	cp $(ODIR)istartup.s $(ODIR)istartup.c
+-	$(CC) $(DEFINES) -E $(ODIR)istartup.c > $(ODIR)istartup.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)istartup.c > $(ODIR)istartup.t
+ 	sed s/@// < $(SDIR)/istartup.t > $(ODIR)istartup.a
+-	as $(DEFINES_A) $(ODIR)istartup.a -o $(ODIR)istartup.o
++	as $(ODIR)istartup.a -o $(ODIR)istartup.o
+ 
+ $(ODIR)ifileIO3.o: $(SDIR)ifileIO3.s
+ 	cp $(ODIR)ifileIO3.s $(ODIR)ifileIO3.c
+-	$(CC) $(DEFINES) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS)) -E $(ODIR)ifileIO3.c > $(ODIR)ifileIO3.t
+ 	sed s/@// < $(SDIR)/ifileIO3.t > $(ODIR)ifileIO3.a
+-	as $(DEFINES_A) $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
++	as $(ODIR)ifileIO3.a -o $(ODIR)ifileIO3.o
+ 
+ $(ODIR)itrace.o: $(SDIR)itrace.s
+ 	cp $(ODIR)itrace.s $(ODIR)itrace.c
+-	$(CC) $(DEFINES) -E $(ODIR)itrace.c > $(ODIR)itrace.t
++	$(CC) -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF -DTIME_PROFILE -DPROFILE $(CFLAGS) -E $(ODIR)itrace.c > $(ODIR)itrace.t
+ 	sed s/@// < $(SDIR)/itrace.t > $(ODIR)itrace.a
+-	as $(DEFINES_A) $(ODIR)itrace.a -o $(ODIR)itrace.o
++	as $(ODIR)itrace.a -o $(ODIR)itrace.o
+ 
+--- src/tools/clm/Makefile.linux	2005-04-20 14:32:06.000000000 +0200
++++ src/tools/clm/Makefile.linux	2012-06-27 16:24:42.780773698 +0200
+@@ -1,11 +1,10 @@
+ CC=gcc
+-CFLAGS=-O -pedantic -Wall -W
+-CPPFLAGS=-DGNU_C -DLINUX -DLINUX_ELF -DI486 # -DA_64
++CPPFLAGS += -DGNU_C -DLINUX -DLINUX_ELF -DI486 # -DA_64
+ 
+ all: clm patch_bin
+ 
+ clm: clm.o cachingcompiler.o
+-	gcc -s clm.o cachingcompiler.o -o clm
++	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clm.o cachingcompiler.o -o clm
+ #	./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+ #	./patch_bin clm CLEANPATH .:$(HOME)/Clean2/stdenv:$(HOME)/Clean2/iolib
+ 
+@@ -15,17 +15,17 @@ clm.o: clm.c cachingcompiler.h
+ #	gcc -pedantic -Wall -c -DGNU_C -DSOLARIS -O clm.c # -mcpu=ppc603 clm.c
+ 
+ patch_bin: patch_bin.o
+-	gcc -s patch_bin.o -o patch_bin
++	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s patch_bin.o -o patch_bin
+  
+ patch_bin.o: patch_bin.c
+  
+ clms: clms.o cachingcompiler.o
+-	gcc -s clms.o cachingcompiler.o -o clms
++	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+ #       ./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+  
+ clms: clms.o cachingcompiler.o
+-	gcc -s clms.o cachingcompiler.o -o clms
++	$(CC) -O -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+  
+ clms.o: clm.c cachingcompiler.h
+-	gcc $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
++	$(CC) -O -pedantic -Wall -W $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
+  
+--- src/tools/clm/Makefile.linux64	2010-07-09 13:27:23.000000000 +0200
++++ src/tools/clm/Makefile.linux64	2012-06-27 16:24:42.780773698 +0200
+@@ -1,9 +1,8 @@
+ CC=gcc
+-CFLAGS=-pedantic -Wall -W
+-CPPFLAGS=-DGNU_C -DLINUX -DLINUX_ELF -DI486 -DA_64
++CPPFLAGS += -DGNU_C -DLINUX -DLINUX_ELF -DI486 -DA_64
+ 
+ clm: clm.o cachingcompiler.o
+-	gcc clm.o cachingcompiler.o -o clm
++	$(CC) -pedantic -Wall -W $(CFLAGS) clm.o cachingcompiler.o -o clm
+ #	./patch_bin clm CLEANLIB $(HOME)/Clean2/exe
+ #	./patch_bin clm CLEANPATH .:$(HOME)/Clean2/stdenv:$(HOME)/Clean2/iolib
+ 
+@@ -14,7 +14,7 @@ clm.o: clm.c cachingcompiler.h
+ #	gcc -pedantic -Wall -c -DGNU_C -DSOLARIS -O clm.c # -mcpu=ppc603 clm.c
+  
+ clms: clms.o cachingcompiler.o
+-	gcc -s clms.o cachingcompiler.o -o clms
++	$(CC) -pedantic -Wall -W $(CFLAGS) -s clms.o cachingcompiler.o -o clms
+  
+ clms.o: clm.c cachingcompiler.h
+-	gcc $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
++	$(CC) -pedantic -Wall -W $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
+ 
diff --git a/clean.rmtmp.patch b/clean.rmtmp.patch
new file mode 100644
index 0000000..b1c6643
--- /dev/null
+++ b/clean.rmtmp.patch
@@ -0,0 +1,9 @@
+--- src/RuntimeSystem/remove_tmp_files_linux	2012-06-27 19:10:56.384603025 +0200
++++ src/RuntimeSystem/remove_tmp_files_linux	2012-06-27 19:10:13.965178937 +0200
+@@ -1,3 +1,3 @@
+-rm scon.s scon.s.copy istartup.cpp istartup.t istartup.a
+-rm ifileIO3.cpp ifileIO3.t ifileIO3.a iprofile.t iprofile.cpp iprofile.a
+-rm scon.o ufileIO2.o ifileIO3.o istartup.o iprofile.o uwrite_heap.o
++rm -f scon.s scon.s.copy istartup.cpp istartup.t istartup.a
++rm -f ifileIO3.cpp ifileIO3.t ifileIO3.a iprofile.t iprofile.cpp iprofile.a
++rm -f scon.o ufileIO2.o ifileIO3.o istartup.o iprofile.o uwrite_heap.o
diff --git a/clean.spec b/clean.spec
new file mode 100644
index 0000000..f5bf6f1
--- /dev/null
+++ b/clean.spec
@@ -0,0 +1,262 @@
+# Clean - The Clean language compiler
+# Review-request: RHBZ 834069 filed on Wed Jun 20 2012
+# Status: APPROVED by Paul Wouters on Thu Jun 28 2012
+# Sponsor: Paul Wouters as of Fri Jul 06 2012
+
+# Known warnings/errors of RPMLINT:
+# Name-repeated-in-summary: This is because the name of the language is the same as that of the compiler
+# Executable-stack: the Clean runtime system is built to use this, so this cannot be changed without major overhauling of the Clean compiler itself
+# Empty files (_startup.dcl, _startupTrace.dcl, _startupProfile.dcl, _system.dcl, _library.dcl): these must be available while running the compiler
+# ifarch-applied-patch: because the archives for 32-bit and 64-bit differ in more then the bootstrapped files, this has to be done (some files have the same name, but have different contents)
+# Only-non-binary-in-usr-lib: because the additional packages do not get compiled on build-time, but we do want all Clean libs centralized
+# No-documentation: the complete language and the modules in this spec file are all documented in the documentation in clean-doc
+
+Name:           clean
+Version:        2.4
+Release:        9%{?dist}
+Group:          Development/Tools
+Summary:        The Clean language compiler
+License:        LGPLv2+ or BSD
+URL:            http://wiki.clean.cs.ru.nl/
+# The sources of the (bootstrapped) compiler, as provided by upstream
+Source0: http://clean.cs.ru.nl/download/Clean24/linux/%{name}%{version}_boot.tar.gz
+Source1: http://clean.cs.ru.nl/download/Clean24/linux/%{name}%{version}_64_boot.tar.gz
+# This has been sent upstream 20-06-2012
+Source2: %{name}.htoclean.1
+# Has been sent upstream 28-06-2012
+Patch0: %{name}.makefiles.patch
+# Have been sent upstream 28-06-2012
+Patch1: %{name}.32bit.patch
+Patch2: %{name}.64bit.patch
+# Has been sent upstream 20-06-2012
+Patch3: %{name}.clmman.patch
+# Have been sent upstream 28-06-2012
+Patch4: %{name}.rmtmp.patch
+Patch5: %{name}.localint.patch
+
+BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# Because the Clean compiler is only available on x86 and x86_64, we notify such
+ExclusiveArch: i386 i486 i586 i686 x86 x86_64
+
+BuildRequires: dos2unix
+#Requires:       
+
+# This has been disabled because the Clean compiler always strips the binaries, so the debug package is empty
+%define debug_package %{nil}
+
+# Sub-packages for optional modules
+%package generics
+Summary: The Generics modules of Clean
+Requires: %{name}
+Group: Development/Libraries
+
+%package mersennetwister
+Summary: An MersenneTwister implementation for Clean
+Requires: %{name}
+Group: Development/Libraries
+
+%package network
+Summary: An TCP/IP implementation for Clean
+Requires: %{name}
+Group: Development/Libraries
+
+%package doc
+Summary: Documentation for the Clean compiler
+Requires: %{name}
+Group: Documentation
+
+
+%description
+The Clean language compiler.
+Released by the MBSD of the Radboud University Nijmegen.
+
+%description generics
+The Generics modules
+
+%description mersennetwister
+An Clean implementation of the Mersenne Twister algorithm
+
+%description network
+TCP/IP support for Clean
+
+%description doc
+Documentation for the Clean compiler and libraries
+
+# The real building starts here
+%prep
+cp -p %SOURCE2 .
+%ifarch i386 i486 i586 i686 x86
+%setup -T -b 0 -q -n %{name}
+%patch0
+%patch1
+%else
+%setup -T -b 1 -q -n %{name}
+%patch0
+%patch2
+%endif
+%patch3
+%patch4
+%patch5
+
+%build
+cd %{_builddir}/%{buildsubdir}/src
+make %{?_smp_mflags} CFLAGS="%{optflags} -s " CC=gcc
+cd %{_builddir}/%{buildsubdir}
+make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -s " CC=gcc
+
+# Build the needed intermediate files in advance (|| : because this will fail, since _Array by itself is not a complete program, and has no Start =)
+cd %{_builddir}/%{buildsubdir}/lib/Generics
+%{_builddir}/%{buildsubdir}/bin/clm _Array || :
+
+# Patch clm to use the includes from _libdir directory
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/bin/clm CLEANLIB %{_libexecdir}/%{name}
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/bin/clm CLEANPATH ""
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/bin/clm CLEANILIB %{_libdir}/%{name}
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/bin/clm PATHLISTRT "%{_libdir}/%{name}"
+
+# Enable patches to use local intermediate files (not advised to do this during bootstrapping)
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/bin/clm LOCALINT Y
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/lib/exe/cocl LOCALINT Y
+%{_builddir}/%{buildsubdir}/bin/patch_bin %{_builddir}/%{buildsubdir}/lib/exe/cg LOCALINT Y
+
+# Fix line ending in doc/CleanLangRep/CleanRep.2.2.css
+dos2unix %{_builddir}/%{buildsubdir}/doc/CleanLangRep/CleanRep.2.2.css
+
+%install
+# Create base directory structure
+mkdir -p %{buildroot}%{_bindir}/
+mkdir -p %{buildroot}%{_libexecdir}/%{name}/
+mkdir -p %{buildroot}%{_libdir}/%{name}/
+mkdir -p %{buildroot}%{_mandir}/man1/
+
+# Copy bin
+cp -p %{_builddir}/%{buildsubdir}/bin/clm %{buildroot}%{_bindir}/
+cp -p %{_builddir}/%{buildsubdir}/bin/htoclean %{buildroot}%{_bindir}/
+
+# Copy libexec folder
+#  exe (cg, cocl and linker)
+cp -p %{_builddir}/%{buildsubdir}/lib/exe/* %{buildroot}%{_libexecdir}/%{name}/
+
+# Copy lib folder
+#  StdLib
+mkdir -p %{buildroot}%{_libdir}/%{name}/StdLib/
+cp -p %{_builddir}/%{buildsubdir}/lib/StdLib/*.icl %{buildroot}%{_libdir}/%{name}/StdLib/
+cp -p %{_builddir}/%{buildsubdir}/lib/StdLib/*.dcl %{buildroot}%{_libdir}/%{name}/StdLib/
+#  StdEnv
+mkdir -p %{buildroot}%{_libdir}/%{name}/StdEnv/
+mkdir -p %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/*.icl %{buildroot}%{_libdir}/%{name}/StdEnv/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/*.dcl %{buildroot}%{_libdir}/%{name}/StdEnv/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_startup.o %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_startupProfile.o %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_startupTrace.o %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_system.* %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_SystemEnumStrict.* %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+cp -p %{_builddir}/%{buildsubdir}/StdEnv/Clean\ System\ Files/_SystemStrictLists.* %{buildroot}%{_libdir}/%{name}/StdEnv/Clean\ System\ Files/
+#  ArgEnv
+mkdir -p %{buildroot}%{_libdir}/%{name}/ArgEnv/
+cp -p %{_builddir}/%{buildsubdir}/lib/ArgEnv/*.icl %{buildroot}%{_libdir}/%{name}/ArgEnv/
+cp -p %{_builddir}/%{buildsubdir}/lib/ArgEnv/*.dcl %{buildroot}%{_libdir}/%{name}/ArgEnv/
+cp -pr %{_builddir}/%{buildsubdir}/lib/ArgEnv/Clean\ System\ Files %{buildroot}%{_libdir}/%{name}/ArgEnv/
+#  Generics
+mkdir -p %{buildroot}%{_libdir}/%{name}/Generics
+mkdir -p %{buildroot}%{_libdir}/%{name}/Generics/Clean\ System\ Files
+cp -p %{_builddir}/%{buildsubdir}/lib/Generics/*.icl %{buildroot}%{_libdir}/%{name}/Generics/
+cp -p %{_builddir}/%{buildsubdir}/lib/Generics/*.dcl %{buildroot}%{_libdir}/%{name}/Generics/
+cp -p %{_builddir}/%{buildsubdir}/lib/Generics/Clean\ System\ Files/_Array.o %{buildroot}%{_libdir}/%{name}/Generics/Clean\ System\ Files/
+#  MersenneTwister
+mkdir -p %{buildroot}%{_libdir}/%{name}/MersenneTwister
+cp -p %{_builddir}/%{buildsubdir}/lib/MersenneTwister/*.icl %{buildroot}%{_libdir}/%{name}/MersenneTwister/
+cp -p %{_builddir}/%{buildsubdir}/lib/MersenneTwister/*.dcl %{buildroot}%{_libdir}/%{name}/MersenneTwister/
+#  TCPIP
+mkdir -p %{buildroot}%{_libdir}/%{name}/TCPIP
+cp -p %{_builddir}/%{buildsubdir}/lib/TCPIP/*.icl %{buildroot}%{_libdir}/%{name}/TCPIP/
+cp -p %{_builddir}/%{buildsubdir}/lib/TCPIP/*.dcl %{buildroot}%{_libdir}/%{name}/TCPIP/
+cp -pr %{_builddir}/%{buildsubdir}/lib/TCPIP/Clean\ System\ Files %{buildroot}%{_libdir}/%{name}/TCPIP/
+
+# Copy man files
+cp -p %{_builddir}/%{buildsubdir}/man/man1/clm.1 %{buildroot}%{_mandir}/man1/
+cp -p %{_builddir}/%{name}.htoclean.1 %{buildroot}%{_mandir}/man1/htoclean.1
+
+# Set the permissions correct, as the clean compiler doesnt
+chmod 755 %{buildroot}%{_bindir}/clm
+chmod 755 %{buildroot}%{_bindir}/htoclean
+chmod 755 %{buildroot}%{_libexecdir}/%{name}/linker
+chmod 755 %{buildroot}%{_libexecdir}/%{name}/cg
+chmod 755 %{buildroot}%{_libexecdir}/%{name}/cocl
+
+# Remove unneeded files
+rm %{_builddir}/%{buildsubdir}/doc/Examples/make.bat
+rm %{buildroot}%{_libdir}/%{name}/Generics/gentest.icl
+
+%files
+%{_bindir}/clm
+%{_bindir}/htoclean
+
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/ArgEnv
+%{_libdir}/%{name}/StdEnv
+%{_libdir}/%{name}/StdLib
+
+%{_libexecdir}/%{name}
+
+%{_mandir}/man1/clm.1.gz
+%{_mandir}/man1/htoclean.1.gz
+
+%doc CleanLicenseConditions.txt
+
+%files generics
+%{_libdir}/%{name}/Generics
+
+%files mersennetwister
+%{_libdir}/%{name}/MersenneTwister
+
+%files network
+%{_libdir}/%{name}/TCPIP
+
+%files doc
+%doc doc/*
+
+%changelog
+* Fri Jul 06 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-9
+- Fixed description-line-too-long for clean-mersennetwister
+- Replaced RPM_OPT_FLAGS with optflags, to use just one set of macro types (RHBZ 834069, comment 18)
+- Moved documentation to seperate -doc package
+- Added Group-tags to main and sub packages
+
+* Fri Jul 06 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-8
+- Changed the Requires: of the subpackages to name macro
+- Updated the changelog to the more readable format with version number on the same line as date and author
+- Fixed some typing and other mistakes in the changelog
+- Modified clm to embed PATHLISTRT, from which all sub-dirs will be imported by default
+- Removed Dynamics because this is not yet supported on Linux
+- Removed gentest.icl from Generics because this was only a testing program, not part of the library itself
+- Modified cp to retain timestamps
+
+* Fri Jun 29 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-7
+- Modified clm so I only have to package minimal abc and o files (only the _startup files and some _System)
+- Added the optional modules in subpackages
+- Moved cocl, cg and linker to libexec/clean
+- Renamed the libdir/Clean to libdir/clean
+
+* Fri Jun 29 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-6
+- Fixed an error in compiling Clean files
+
+* Fri Jun 29 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-5
+- Fixed a regression with 32bit patch
+- CFLAGS fixed (RHBZ 834069, comment 11)
+
+* Fri Jun 29 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-4
+- Stripped bin/clm (RHBZ 834069, comment 8)
+- Removed doc/Examples/make.bat (RHBZ 834069, comment 8)
+
+* Thu Jun 28 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-3
+- Fixed a few things according to review comments (RHBZ 834069, comment 6)
+- Case of name changed to all lower
+
+* Wed Jun 27 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-2
+- Fixed building according to review comments (RHBZ 834069, comment 4)
+
+* Wed Jun 20 2012 Patrick Uiterwijk <puiterwijk at gmail.com> - 2.4-1
+- First packaging effort
diff --git a/sources b/sources
index e69de29..01b3b3d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+b715e981dc1ef6702c2f670ad888f9af  clean2.4_64_boot.tar.gz
+558dc5c85322617ea7138a9a6838c89f  clean2.4_boot.tar.gz


More information about the scm-commits mailing list