3 # GNU Mes --- Maxwell Equations of Software
4 # Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6 # This file is part of GNU Mes.
8 # GNU Mes is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
13 # GNU Mes is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
23 # We need mes/module/mes/boot-0.scm created
24 # Create traditional GNU config.h with the needed defines?
29 ################################################################################
33 gcc -c -D WITH_GLIBC=1 -I include -I lib -o out-glibc/libmes.o lib/libmes.c
34 gcc -c -D WITH_GLIBC=1 -D VERSION=\"0.19\" -D MODULEDIR=\"module\" -D PREFIX=\"/usr/local\" -I include -o out-glibc/mes.o src/mes.c
35 gcc out-glibc/mes.o out-glibc/libmes.o -o out-glibc/mes
37 MES_PREFIX=mes out-glibc/mes --help
39 ################################################################################
42 # To get a i686-unknown-linux-gnu-gcc, you may do:
43 # GUIX_PACKAGE_PATH=guix guix environment -l .guix.scm
45 # guix environment --ad-hoc -e '(begin (use-modules (gnu packages cross-base)) (list (cross-binutils "i686-unknown-linux-gnu") (cross-gcc "i686-unknown-linux-gnu")))'
49 i686-unknown-linux-gnu-gcc -c -g -O0 -nostdinc -fno-builtin -fno-stack-protector -I include -o out-mes/crt1.o lib/linux/x86-mes-gcc/crt1.c
50 i686-unknown-linux-gnu-gcc -c -g -O0 -nostdinc -fno-builtin -fno-stack-protector -I include -I lib -o out-mes/libc.o lib/libc.c
51 i686-unknown-linux-gnu-gcc -c -g -O0 -nostdinc -fno-builtin -fno-stack-protector -I include -D VERSION=\"0.19\" -D MODULEDIR=\"module\" -D PREFIX=\"/usr/local\" -o out-mes/mes.o src/mes.c
52 i686-unknown-linux-gnu-gcc -g -nostdlib -o out-mes/mes out-mes/crt1.o out-mes/mes.o out-mes/libc.o
54 # Test it, use ./pre-inst-env out-mes/mes --help or simply
55 MES_PREFIX=mes out-mes/mes --help
57 ################################################################################
58 # To silence warnings, add
59 # -Wno-discarded-qualifiers -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-pointer-sign -Wno-int-conversion -Wno-incompatible-pointer-types