Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2023 13:44:09 -0800
From:      Ravi Pokala <rpokala@freebsd.org>
To:        Warner Losh <imp@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org>
Subject:   Re: e35448a901aa - main - powerpc: Drop old workaround for old gcc
Message-ID:  <68E1F686-AB9F-4AC9-BBC5-0FE5F17041C0@panasas.com>
In-Reply-To: <202302141654.31EGsBtE057310@gitrepo.freebsd.org>
References:  <202302141654.31EGsBtE057310@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> However, that causes problems
> for programs that do:

It feels like there was supposed to be an example there, but there isn't on=
e...?

Thanks,

Ravi (rpokala@)

=EF=BB=BF-----Original Message-----
From: <owner-src-committers@freebsd.org <mailto:owner-src-committers@freebs=
d.org>> on behalf of Warner Losh <imp@FreeBSD.org <mailto:imp@FreeBSD.org>>
Date: 2023-02-14, Tuesday at 08:54
To: <src-committers@FreeBSD.org <mailto:src-committers@FreeBSD.org>>, <dev-=
commits-src-all@FreeBSD.org <mailto:dev-commits-src-all@FreeBSD.org>>, <dev-=
commits-src-main@FreeBSD.org <mailto:dev-commits-src-main@FreeBSD.org>>
Subject: git: e35448a901aa - main - powerpc: Drop old workaround for old gc=
c


The branch main has been updated by imp:


URL: https://cgit.FreeBSD.org/src/commit/?id=3De35448a901aa56aa232efbc4fe7a73=
a9bdac3511 <https://cgit.FreeBSD.org/src/commit/?id=3De35448a901aa56aa232efbc4=
fe7a73a9bdac3511>


commit e35448a901aa56aa232efbc4fe7a73a9bdac3511
Author: Warner Losh <imp@FreeBSD.org <mailto:imp@FreeBSD.org>>
AuthorDate: 2023-02-14 16:47:08 +0000
Commit: Warner Losh <imp@FreeBSD.org <mailto:imp@FreeBSD.org>>
CommitDate: 2023-02-14 16:47:08 +0000


powerpc: Drop old workaround for old gcc


Very old versions of gcc defined _BIG_ENDIAN and _LITTLE_ENDIAN. So to
work around that, we undefined them here. However, that causes problems
for programs that do:


(and many other variations on that theme). Since this often is the
result of weirdly nested includes in the ports world that are hard to
unwind, drop this workaround to help more ports build out of the box.
If there's still an issue here (and my testing hasn't shown it), we'll
fix the issue in a brand-new way once I have a reproducer.


This fixes the mesa-devel build, and others


Sponsored by: Netflix
Tested by: pkubaj
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D38564 <https://reviews.=
freebsd.org/D38564>
---
sys/powerpc/include/endian.h | 12 ------------
1 file changed, 12 deletions(-)


diff --git a/sys/powerpc/include/endian.h b/sys/powerpc/include/endian.h
index 9e28237bfd24..0fac50361632 100644
--- a/sys/powerpc/include/endian.h
+++ b/sys/powerpc/include/endian.h
@@ -36,18 +36,6 @@
#define _MACHINE_ENDIAN_H_


#include <sys/_types.h>
-
-/*
- * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__
- * and __LITTLE_ENDIAN__ (resp).
- */
-#ifdef _BIG_ENDIAN
-#undef _BIG_ENDIAN
-#endif
-#ifdef _LITTLE_ENDIAN
-#undef _LITTLE_ENDIAN
-#endif
-
#include <sys/_endian.h>


#endif /* !_MACHINE_ENDIAN_H_ */







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68E1F686-AB9F-4AC9-BBC5-0FE5F17041C0>