[clean-list] Re: clean on linux: Floating point exception

vag vagoff at mail.ru
Mon Aug 6 12:33:42 MEST 2007


WAARSCHUWING: Dit bericht is door de mailserver software aangepast!
De volgende paragraaf geeft indicaties van gedane aanpassingen.
-----------------
WARNING: This e-mail has been altered by the mailserver software!
Following this paragraph are indications of the actual changes made.
-----------------
      - Postmaster <postmaster at science.ru.nl>


Een bijlage genaamd install.sh werd verwijderd uit dit document omdat dit
een veiligheids risico vormde. Als deze bijlage toch gewenst is, neem dan contact
op met de afzender en gebruik een andere manier om deze bijlage te verkrijgen.
-----------------
An attachment named install.sh was removed from this document as it
constituted a security hazard. If you require this document, please contact
the sender and arrange an alternate means of receiving it.
-----------------
- Dangerous extension!
-----------------

-------------- next part --------------
I wrote a helper to install fresh CLEAN compiler on Linux system:

#!/bin/bash

boot="distfiles/Clean2.2_boot.tar.gz"
sources="distfiles/Clean2.2Sources.tgz"
clean="distfiles/Clean2.2.tar.gz"
TOP="$PWD"

set +e

# Unpack all and patch
unpack_all()
{
[ ! -d boot ] && ( mkdir x; cd x; tar xzf "$TOP/$boot"; cd ..; mv x/* 
boot; rmdir x)
[ ! -d sources ] && ( mkdir y; cd y; tar xzf "$TOP/$sources"; cd ..; mv 
y/* sources; rmdir y; cd sources; patch -p1 < "$TOP/gcc_options.patch" )
[ ! -d clean ] && ( mkdir z; cd z; tar xzf "$TOP/$clean"; cd ..; mv z/* 
clean; rmdir z; cd clean; patch -p1 < "$TOP/target_dir.patch" )
}

# Build compiler from sources
build_compiler()
{
CLEANPATH="$PATH:$1"
( cd sources/compiler; PATH="$CLEANPATH" sh unix/make.linux.sh )
( cd sources/tools/clm; PATH="$CLEANPATH" make -f Makefile.linux )
( cd sources/CodeGenerator; PATH="$CLEANPATH" make -f Makefile.linux )
( cd sources/RuntimeSystem; PATH="$CLEANPATH" make -f Makefile.linux )
( cd sources/libraries/StdEnv; PATH="$CLEANPATH" make -f Makefile.linux 
install )
( cd sources/tools/elf_linker; PATH="$CLEANPATH" clm -nr -nt -h 20m -s 
2m -I ia32 -I ../../libraries/ArgEnvUnix -I ../../compiler/main/Unix 
linker -o linker )
( cd "sources/tools/htoclean/htoclean source code"; PATH="$CLEANPATH" 
clm -I ../../../libraries/ArgEnvUnix -l 
../../../libraries/ArgEnvUnix/ArgEnvC.o -h 4m -nt -nr -I unix htoclean 
-o ../htoclean )
}

unpack_all

# Boot up tools
( cd boot/src; make )

# Build compiler from sources
build_compiler "$TOP/boot/bin:$TOP/boot/exe"

# Copy fresh compiler to distribution directory
cp -a sources/tools/clm/clm             clean/bin/clm
cp -a sources/tools/clm/patch_bin       clean/bin/patch_bin
cp -a sources/tools/htoclean/htoclean   clean/bin/htoclean
cp -a sources/compiler/cocl             clean/exe/cocl
cp -a sources/CodeGenerator/cg          clean/exe/cg
cp -a sources/tools/elf_linker/linker   clean/exe/linker
( cd clean/bin; ./patch_bin clm CLEANLIB "$TOP/clean/exe"; ./patch_bin 
clm CLEANPATH "$TOP/clean/stdenv" )

# Rebuild compiler from sources
rm -rf sources
unpack_all
build_compiler "$TOP/clean/bin:$TOP/clean/exe"

# ####################################

# Build X Libraries
# ( cd clean; make io )
# Build Standard Libraries and
# Install new compiler
mkdir /usr/local/lib/clean-2.2
( cd clean; make install )
cp -a /usr/local/lib/clean-2.2/bin/* /usr/local/bin/

-------------- next part --------------
diff -uwrd Sources/CodeGenerator/Makefile.linux sources/CodeGenerator/Makefile.linux
--- Sources/CodeGenerator/Makefile.linux	2006-12-18 16:59:57.000000000 +0200
+++ sources/CodeGenerator/Makefile.linux	2007-08-02 16:50:42.000000000 +0300
@@ -1,6 +1,6 @@
 
 CC = gcc
-CFLAGS = -DI486 -DGNU_C -DLINUX -DLINUX_ELF -O -fomit-frame-pointer
+CFLAGS = -Os -O3 -DI486 -DGNU_C -DLINUX -DLINUX_ELF -fomit-frame-pointer
 
 OBJECTS = cg.o cgcalc.o cgcode.o cginput.o cginstructions.o \
 	cglin.o cgopt.o cgias.o cgiwas.o cgstack.o
diff -uwrd Sources/compiler/backendC/CleanCompilerSources/Makefile sources/compiler/backendC/CleanCompilerSources/Makefile
--- Sources/compiler/backendC/CleanCompilerSources/Makefile	2006-12-18 16:59:58.000000000 +0200
+++ sources/compiler/backendC/CleanCompilerSources/Makefile	2007-08-02 16:51:30.000000000 +0300
@@ -1,6 +1,6 @@
 # This is for Unix
 CC = gcc
-CFLAGS = -D_SUN_ -DGNU_C -O -fomit-frame-pointer
+CFLAGS = -D_SUN_ -DGNU_C -Os -O3 -fomit-frame-pointer
 AR = ar
 RANLIB = ranlib
 
diff -uwrd Sources/compiler/main/Unix/Makefile sources/compiler/main/Unix/Makefile
--- Sources/compiler/main/Unix/Makefile	2006-12-18 16:59:58.000000000 +0200
+++ sources/compiler/main/Unix/Makefile	2007-08-02 16:52:22.000000000 +0300
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-pedantic -Wall -W -O
+CFLAGS=-pedantic -Wall -W -Os -O3
 CPPFLAGS=
 
 all: cDirectory.o ipc.o set_return_code_c.o \
diff -uwrd Sources/RuntimeSystem/Makefile.linux sources/RuntimeSystem/Makefile.linux
--- Sources/RuntimeSystem/Makefile.linux	2006-12-18 16:59:57.000000000 +0200
+++ sources/RuntimeSystem/Makefile.linux	2007-08-02 16:51:44.000000000 +0300
@@ -3,7 +3,7 @@
 ODIR = ./
 
 DEFINES = -DUSE_CLIB -DLINUX -DI486 -DGNU_C -DELF
-DEFINESA = -D USE_CLIB -D LINUX -D I486 -D GNU_C -D ELF
+DEFINESA = -Os -O3 -D USE_CLIB -D LINUX -D I486 -D GNU_C -D ELF
 
 all: $(ODIR)_startup.o
 
diff -uwrd Sources/tools/clm/Makefile.linux sources/tools/clm/Makefile.linux
--- Sources/tools/clm/Makefile.linux	2005-04-20 14:32:06.000000000 +0300
+++ sources/tools/clm/Makefile.linux	2007-08-02 16:51:56.000000000 +0300
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-O -pedantic -Wall -W
+CFLAGS=-Os -O3 -pedantic -Wall -W
 CPPFLAGS=-DGNU_C -DLINUX -DLINUX_ELF -DI486 # -DA_64
 
 all: clm patch_bin
-------------- next part --------------
diff -uwrd clean/Makefile clean/Makefile
--- clean/Makefile	2006-12-08 18:01:08.000000000 +0200
+++ clean/Makefile	2007-08-02 17:03:37.000000000 +0300
@@ -25,7 +25,7 @@
 # it elsewhere. 
 #
 
-INSTALL_DIR = $(CURRENTDIR)
+INSTALL_DIR = /usr/local/lib/clean-2.2
 
 INSTALL_BIN_DIR = $(INSTALL_DIR)/bin
 


More information about the clean-list mailing list