diff --git a/packaging/freebsd/package.sh b/packaging/freebsd/package.sh index b2348cc3..87e5e29f 100755 --- a/packaging/freebsd/package.sh +++ b/packaging/freebsd/package.sh @@ -113,11 +113,12 @@ echo "wrote $OUT_DIR/$BASENAME.tar.gz" if [ "$DRY_RUN" = 1 ] || [ "$ARCH" = "$HOST_ARCH" ]; then "$STAGE/bin/$(smoke_bin)" --version else - # They cannot run here, so check what they are instead. + # They cannot run here, so check what they are instead: executables, not libraries or objects. + # An older file(1) calls a PIE a shared object; its interpreter still marks it as a program. want="$ARCH"; [ "$ARCH" != x86_64 ] || want=x86-64 for b in "$STAGE"/bin/*; do case "$(file -b "$b")" in - ELF*"$want"*FreeBSD*) ;; + ELF*" executable, "*"$want"*FreeBSD* | ELF*"$want"*FreeBSD*interpreter*) ;; *) echo "error: $b is not a FreeBSD $ARCH executable: $(file -b "$b")" >&2; exit 1 ;; esac done