[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Any easy war to access cpu.h in vl.c
From: |
Thomas Huth |
Subject: |
Re: [Qemu-discuss] Any easy war to access cpu.h in vl.c |
Date: |
Tue, 4 Dec 2018 16:13:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-12-04 15:46, ZEESHAN HAYAT wrote:
> Hi,
> I am trying to access target/nios2/cpu.h in vl.c. If I add #include
> "target/nios2/cpu.h" in vl.c, I get the following errors:
You can not include a target-specific header file in common code. vl.c
is only compiled once for all targets, but target-specific header files
like cpu.h contain target-specific #defines like TARGET_LONG_BITS - so
if you'd use one of these defines in common code, it would be right for
one target but wrong for the other.
If you need to use cpu.h from the target directory, add your code to a
target specific file instead. Look for "obj-y" in the Makefiles instead
of "common-obj-y".
HTH,
Thomas