Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Thomas Huth
On 15/03/2021 19.24, Eric Blake wrote: On 3/15/21 8:54 AM, Thomas Huth wrote: We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files. Using them in common code is wrong and leads to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Eric Blake
On 3/15/21 8:54 AM, Thomas Huth wrote: > We are generating a lot of target-specific defines in the *-config-devices.h > and *-config-target.h files. Using them in common code is wrong and leads > to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there > as expected. To avoid

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Thomas Huth
On 15/03/2021 16.37, Peter Maydell wrote: On Mon, 15 Mar 2021 at 15:26, Thomas Huth wrote: On 15/03/2021 15.52, Philippe Mathieu-Daudé wrote: On 3/15/21 2:54 PM, Thomas Huth wrote: We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files.

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Peter Maydell
On Mon, 15 Mar 2021 at 15:26, Thomas Huth wrote: > > On 15/03/2021 15.52, Philippe Mathieu-Daudé wrote: > > On 3/15/21 2:54 PM, Thomas Huth wrote: > >> We are generating a lot of target-specific defines in the > >> *-config-devices.h > >> and *-config-target.h files. Using them in common code is

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Thomas Huth
On 15/03/2021 15.52, Philippe Mathieu-Daudé wrote: On 3/15/21 2:54 PM, Thomas Huth wrote: We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files. Using them in common code is wrong and leads to very subtle bugs since a "#ifdef CONFIG_SOMETHING"

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Claudio Fontana
On 3/15/21 4:08 PM, Thomas Huth wrote: > On 15/03/2021 15.07, Claudio Fontana wrote: >> On 3/15/21 2:54 PM, Thomas Huth wrote: >>> We are generating a lot of target-specific defines in the *-config-devices.h >>> and *-config-target.h files. Using them in common code is wrong and leads >>> to very

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Thomas Huth
On 15/03/2021 15.07, Claudio Fontana wrote: On 3/15/21 2:54 PM, Thomas Huth wrote: We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files. Using them in common code is wrong and leads to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 2:54 PM, Thomas Huth wrote: > We are generating a lot of target-specific defines in the *-config-devices.h > and *-config-target.h files. Using them in common code is wrong and leads > to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there > as expected. To avoid

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Claudio Fontana
On 3/15/21 2:54 PM, Thomas Huth wrote: > We are generating a lot of target-specific defines in the *-config-devices.h > and *-config-target.h files. Using them in common code is wrong and leads > to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there > as expected. To avoid

[RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Thomas Huth
We are generating a lot of target-specific defines in the *-config-devices.h and *-config-target.h files. Using them in common code is wrong and leads to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there as expected. To avoid these issues, we are already poisoning some of the