Skip to contentSkip to conversation

package/prboom: Fix big endian fix up

PATCH In review Daniel Palmer 2 participants 3 messages Mar 11, 2025 – Mar 16, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/prboom: Fix big endian fix up

The hack to force big endian support when building for a big endian machine doesn't work as there is some whitespace between "#" and "undef" in config.h.

Add a wildcard between those two so that the target line matches and the replacement is done.

Allows me to play DOOM on my LC475.

---
 package/prboom/prboom.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/prboom/prboom.mk +1 -1
index c1ba05ff7035..fc440e5cf8d3 100644
@@ -40,7 +40,7 @@ PRBOOM_CONF_OPTS = \
 
 # endianness detection isn't used when cross compiling
 define PRBOOM_BIG_ENDIAN_FIXUP
-	$(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \
+	$(SED) 's,.*#.*undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \
 		$(PRBOOM_DIR)/config.h
 endef
 
Signature · 6 lines
2.47.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Daniel" == Daniel Palmer <[email protected]> writes:

The hack to force big endian support when building for a big endian machine doesn't work as there is some whitespace between "#" and "undef" in config.h.

Ahh, indeed. The config.h in the tarball has #undef, but when it gets regenerated by configure it ends up as '/* # undef WORDS_BIGENDIAN */'

Quoted 4 lines

Add a wildcard between those two so that the target line matches and the replacement is done.

Allows me to play DOOM on my LC475.

Wow, thats old ;)

Quoted 1 line

Committed, thanks.

Quoted 25 lines
---
 package/prboom/prboom.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/prboom/prboom.mk +1 -1
index c1ba05ff7035..fc440e5cf8d3 100644
@@ -40,7 +40,7 @@ PRBOOM_CONF_OPTS = \
 
 # endianness detection isn't used when cross compiling
 define PRBOOM_BIG_ENDIAN_FIXUP
-	$(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \
+	$(SED) 's,.*#.*undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \
 		$(PRBOOM_DIR)/config.h
 endef
 
Signature · 6 lines
2.47.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Daniel Palmer
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Daniel" == Daniel Palmer <[email protected]> writes:

The hack to force big endian support when building for a big endian machine doesn't work as there is some whitespace between "#" and "undef" in config.h.

Quoted 6 lines

Add a wildcard between those two so that the target line matches and the replacement is done.

Allows me to play DOOM on my LC475.

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot