Skip to content

Commit c5e8f8f

Browse files
committed
- Fixed architecture check when determining pointer size.
- Size of sig_atomic_t is 4 bytes, not 8.
1 parent 96eedd4 commit c5e8f8f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/openresty/build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ curl -# -L https://github.com/openembedded/meta-openembedded/raw/master/meta-web
100100
curl -# -L https://github.com/openembedded/meta-openembedded/raw/master/meta-webserver/recipes-httpd/nginx/files/0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch | patch -p1 -d "$NGINX_SRC_DIR"
101101

102102
case "$(xx-info arch)" in
103-
x86_64|aarch64) PTRSIZE=8 ;;
104-
*) PTRSIZE=4 ;;
103+
amd64) PTRSIZE=8; ENDIANNESS=little ;;
104+
arm64) PTRSIZE=8; ENDIANNESS=little ;;
105+
386) PTRSIZE=4; ENDIANNESS=little ;;
106+
arm) PTRSIZE=4; ENDIANNESS=little ;;
107+
*) echo "Unknown ARCH: $(xx-info arch)" ; exit 1 ;;
105108
esac
106109

107110
log "Configuring OpenResty..."
@@ -133,11 +136,12 @@ log "Configuring OpenResty..."
133136
--with-threads \
134137
--with-file-aio \
135138
\
139+
--with-endian=$ENDIANNESS \
136140
--with-int=4 \
137141
--with-long=${PTRSIZE} \
138142
--with-long-long=8 \
139143
--with-ptr-size=${PTRSIZE} \
140-
--with-sig-atomic-t=${PTRSIZE} \
144+
--with-sig-atomic-t=4 \
141145
--with-size-t=${PTRSIZE} \
142146
--with-off-t=8 \
143147
--with-time-t=${PTRSIZE} \

0 commit comments

Comments
 (0)