/
conf.COG
executable file
·54 lines (46 loc) · 1.54 KB
/
conf.COG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh -e
# Bochs x64 simulator for the BochsX64Alien plugin.
# this sets up the x64 compile for Cog on linux. Disable as much inessential
# stuff as possible leaving only the cpu/fpu & memory interface
# build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using
# $ ./conf.COG
# $ ../../processors/IA32/bochs/makeem
set echo
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
CFLAGS="-m32 $CFLAGS"
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS"
CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions $CFLAGS"
CFLAGS="-g $CFLAGS"
CPPFLAGS=""
CXXFLAGS="$CFLAGS"
export CFLAGS
export CPATH
export CPPFLAGS
export CXXFLAGS
export LDFLAGS
../../processors/IA32/bochs/configure \
--enable-Cog \
--enable-cpu-level=6 \
--enable-sse=2 \
--enable-assert-checks \
--with-nogui \
--enable-x86-64 \
--enable-global-pages \
--disable-mtrr \
--disable-sb16 \
--disable-ne2000 \
--disable-pci \
--disable-acpi \
--disable-apic \
--disable-clgd54xx \
--disable-usb \
--disable-plugins \
${CONFIGURE_ARGS}
# apic == Advanced programmable Interrupt Controller
# acpi == Advanced Configuration and Power Interface
# pci == Peripheral Component Interconnect local bus
# clgd54xx == Cirrus Logic GD54xx video card
# avoid conflict with squeak unix build's config.h
echo cp config.h bochsconfig.h
cp config.h bochsconfig.h
echo "and don't forget to run ../../processors/IA32/bochs/makeem"