Commit 617c7d76 authored by John van Groningen's avatar John van Groningen
Browse files

Merge branch 'build-32-bit-version-on-64-bit-platform' into 'master'

Build 32-bit version on 64-bit (linux) platform

See merge request !8
parents 67c6ff25 a7927053
Pipeline #41047 passed with stage
in 1 minute and 32 seconds
CC=gcc
CFLAGS=-O -pedantic -Wall -W
CFLAGS=-m32 -O -pedantic -Wall -W
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
gcc -m32 -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,16 +15,16 @@ 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
gcc -m32 -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
gcc -m32 -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
gcc -m32 -s clms.o cachingcompiler.o -o clms
clms.o: clm.c cachingcompiler.h
gcc $(CFLAGS) $(CPPFLAGS) -c -o clms.o -DSYSTEM_LINKER clm.c
......
......@@ -3483,6 +3483,9 @@ static int link_project (P_NODE first_project_node,char *options_file_name,char
if (gcc_with_enable_default_pie (linker_file_name))
*arg++="-no-pie";
# endif
# if defined (LINUX) && !defined (A_64)
*arg++="-m32";
# endif
# ifdef ARM
*arg++="-Wl,--gc-sections";
# endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment