SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,24 @@
fix endianess detection on OpenBSD
--- scripts/endianess.sh.orig Tue Apr 6 13:19:08 2010
+++ scripts/endianess.sh Tue Apr 6 13:20:08 2010
@@ -1,16 +1,13 @@
-#!/bin/bash
+#!/bin/sh
# When cross compiling, you may put cross compiler directory
# in PATH before native gcc (aka spoofing), or you may set CC
# to exact name of cross compiler:
# CC=/opt/ppc_gcc/bin/gcc endianess
-# x86 and friends are considerd LITTLE endian, all others are BIG
-a=`${CC:-gcc} -v 2>&1 | grep Target`
-[ $? -ne 0 ] && exit 1
-#echo $a
+a=`sysctl -n hw.byteorder`
-if [ "${a/86/}" != "$a" ]; then
+if [ "${a}" == "1234" ]; then
echo LITTLE
else
echo BIG