* [PATCH] fix build when --enable-checking is false
@ 2021-05-19 6:48 Eli Schwartz
2021-05-19 11:09 ` Nick Clifton
2021-05-19 13:11 ` Alan Modra
0 siblings, 2 replies; 3+ messages in thread
From: Eli Schwartz @ 2021-05-19 6:48 UTC (permalink / raw)
To: binutils
The ENABLE_CHECKING macro is only ever defined in confdefs.h when
enabled, and otherwise gets inconsistently:
- explicitly checked in some files where it is used, to define it to 0
if it isn't yet defined
- or at the use site, checked via a preprocessor #if check rather than a
compiler if() check.
In commit ebb17864920d1b15f3c392ce5cd22ddee169e825 one use of this macro
got added which violates this expectation.
The resulting build error is generally not noticeable since
bfd/development.sh makes the build a development build by default.
---
binutils/dwarf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 6dd98789e28..cfc1436df64 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -41,6 +41,10 @@
#define CHAR_BIT 8
#endif
+#ifndef ENABLE_CHECKING
+#define ENABLE_CHECKING 0
+#endif
+
#undef MAX
#undef MIN
#define MAX(a, b) ((a) > (b) ? (a) : (b))
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix build when --enable-checking is false
2021-05-19 6:48 [PATCH] fix build when --enable-checking is false Eli Schwartz
@ 2021-05-19 11:09 ` Nick Clifton
2021-05-19 13:11 ` Alan Modra
1 sibling, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2021-05-19 11:09 UTC (permalink / raw)
To: Eli Schwartz, binutils
Hi Eli,
> +#ifndef ENABLE_CHECKING
> +#define ENABLE_CHECKING 0
> +#endif
Approved and applied. Thanks for the patch.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix build when --enable-checking is false
2021-05-19 6:48 [PATCH] fix build when --enable-checking is false Eli Schwartz
2021-05-19 11:09 ` Nick Clifton
@ 2021-05-19 13:11 ` Alan Modra
1 sibling, 0 replies; 3+ messages in thread
From: Alan Modra @ 2021-05-19 13:11 UTC (permalink / raw)
To: Eli Schwartz; +Cc: binutils
On Wed, May 19, 2021 at 02:48:57AM -0400, Eli Schwartz via Binutils wrote:
> diff --git a/binutils/dwarf.c b/binutils/dwarf.c
> index 6dd98789e28..cfc1436df64 100644
> --- a/binutils/dwarf.c
> +++ b/binutils/dwarf.c
> @@ -41,6 +41,10 @@
> #define CHAR_BIT 8
> #endif
>
> +#ifndef ENABLE_CHECKING
> +#define ENABLE_CHECKING 0
> +#endif
> +
> #undef MAX
> #undef MIN
> #define MAX(a, b) ((a) > (b) ? (a) : (b))
Thanks for fixing this.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-19 13:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 6:48 [PATCH] fix build when --enable-checking is false Eli Schwartz
2021-05-19 11:09 ` Nick Clifton
2021-05-19 13:11 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).