csh: Fix DT_RUNPATH

* Respect LDFLAGS
This commit is contained in:
Tee KOBAYASHI 2023-01-12 13:19:38 +09:00 committed by xtkoba
parent 864e197c34
commit fc7b0651e0
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
#CFLAGS+=-g
#CFLAGS+=-Wall
-CFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
+CFLAGS+=-z muldefs -I${PREFIX}/include -L${PREFIX}/lib -L/system/lib ${DFLAGS}
+CFLAGS+=${CPPFLAGS} ${DFLAGS}
SRCS= alloc.c char.c const.c csh.c dir.c dol.c error.c exec.c exp.c file.c \
func.c glob.c hist.c init.c lex.c misc.c parse.c proc.c \
sem.c set.c str.c time.c
@ -18,7 +18,7 @@
- ${CC} ${CFLAGS} ${CPPFLAGS} -O0 -c $<
-.endif
+all:
+ ${CC} -o ${PROG} ${CFLAGS} -DBIONIC ${SRCS} -lbsd -landroid-glob -lc
+ ${CC} -o ${PROG} ${CFLAGS} -DBIONIC ${SRCS} ${LDFLAGS} -lbsd -landroid-glob -lc
+
+clean:
+ rm -f ${CLEANFILES}

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="C Shell with process control from 3BSD"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=20110502
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/c/csh/csh_${TERMUX_PKG_VERSION}.orig.tar.gz
TERMUX_PKG_SHA256=8bcba4fe796df1b9992e2d94e07ce6180abb24b55488384f9954aa61ecd8d68b
TERMUX_PKG_DEPENDS="libandroid-glob, libbsd"
@ -14,6 +15,7 @@ termux_step_post_get_source() {
termux_step_pre_configure() {
CFLAGS="${CFLAGS/-Oz/-Os}"
LDFLAGS+=" -Wl,-z,muldefs"
}
termux_step_post_configure() {