Hallo Leo,
I had make this for long time. I could not compile ghld on my x64 pc. I
used ghld an rpm paket compiled one a 32bit machine.
For my work I used the attached makefile. You see some options for
compiling and linking.
Best regards
René Doß
On 11/29/2014 12:32 AM, Léo Testard wrote:
Hello,
I'm trying to build code for 32-bits x86 (because I have to link it
against 32-bits code) on an x86_64 build machine. But it looks like
x86 target libraries are not build, even with --enable-multilib. Is
there a way to build x86 target libraries ?
I found this post on the mailing list:
https://mail.gna.org/public/ghdl-discuss/2005-12/msg00002.html, but
the suggested solution (copying libraries from an x86 machine) doesn't
work. In fact it looks like a recent version of GHDL (I'm working with
0.31) doesn't even recognizes options such as -m32, -Wc or -Wa. Is
this still up-to-date ?
As a workaround, I tried building an x86 version of GHDL using
--target=i386-linux-gnu, but I got assembly errors in
vhdl/grt/config/i386.S, which shows it's 32 bits code compiled as 64
code. This sounds like a bug in the build system. Is this file
intended to be built for the target, in which case it should be build
using the target compiler, or for the host, in which case it should be
64 bits assemly...
Thanks,
Leo
This body part will be downloaded on demand.
all:
rm -rf work
mkdir work
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/helper/txt_util.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/pkg_mlite.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/pkg_alu.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/pkg_branch.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/pkg_control.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/device/pkg_wishbone.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/device/pkg_AHBlight.vhd
# ghdl -a -Wa,--32 --ieee=synopsys --work=work --workdir=work
../rtl/debug/pkg_debug.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/device/uart/ahb_uart.vhd
ghdl -a -Wa,--32 --ieee=synopsys --work=work --workdir=work
../rtl/device/uart/uart.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/device/uart/UART_TX_8N1.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/device/uart/UART_RX_8N1.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/MAIS_cpu.vhd
ghdl -a -Wa,--32 --ieee=synopsys --work=work --workdir=work
../rtl/MAIS_AHBlight.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/tb_MAIS.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/inst_pc.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/inst_fetch.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cp0/cp0.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/inst_decode.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/reg_bank.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/inst_execute.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/multiplier.vhd
# ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/alu.vhd
ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/cpu/load_access.vhd
# ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/debug/helper.vhd
# ghdl -a -Wa,--32 --ieee=synopsys --work=work --workdir=work
../rtl/debug/asm2file.vhd
# ghdl -a -Wa,--32 --work=work --workdir=work ../rtl/memory/iram.vhd
ghdl -a -Wa,--32 --work=work --workdir=work
../rtl/memory/ahb_memory.vhd
ghdl -e -Wa,--32 -Wl,-m32 --ieee=synopsys -fexplicit --workdir=work
-Pwork tb_lm_cpu
ghdl -r tb_lm_cpu --disp-tree=inst --wave=tbench.ghw --stop-time=50us
# ghdl -r tbench --disp-tree=inst --wave=tbench.ghw
view:
gtkwave tbench.ghw a.sav
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss