Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ modules: $(patsubst %.o,../rtlib/%.so,$(obj-m))
$(Q)objcopy -j .rtapi_export -O binary objects/$*.tmp objects/$*.sym
$(Q)(echo '{ global : '; tr -s '\0' < objects/$*.sym | xargs -r0 printf '%s;\n' | grep .; echo 'local : * ; };') > objects/$*.ver
$(Q)$(CC) -shared -Bsymbolic $(LDFLAGS) -Wl,--version-script,objects/$*.ver -o $@ $^ -lm
$(Q)chmod -x $@

RTFLAGS += -fno-strict-aliasing -fwrapv

Expand Down
1 change: 1 addition & 0 deletions src/Makefile.modinc.in
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ $(foreach mod,$(patsubst %.o,%,$(obj-m)),\
$(Q)objcopy -j .rtapi_export -O binary $*.tmp $*.sym
$(Q)(echo '{ global : '; tr -s '\0' < $*.sym | xargs -r0 printf '%s;\n' | grep .; echo 'local : * ; };') > $*.ver
$(Q)$(CC) -shared -Bsymbolic $(LDFLAGS) -Wl,--version-script,$*.ver -o $@ $^ -lm
$(Q)chmod -x $@
endif

ifeq ($(BUILDSYS),normal)
Expand Down
20 changes: 20 additions & 0 deletions tests/halcompile/personalities_mod/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
#!/bin/sh
set -e

DIR=../../../src/hal/components ;# use in-tree components
halcompile --personalities=2 --install $DIR/lincurve.comp
halcompile --personalities=2 --install $DIR/logic.comp
halcompile --personalities=2 --install $DIR/bitslice.comp

# This tells us the expected filename extension ${MODULE_EXT} of realtime
# modules.
source "${EMC2_HOME}/scripts/rtapi.conf"

for INSTALLED_FILE in "${EMC2_HOME}"/rtlib/{lincurve,logic,bitslice}"${MODULE_EXT}"; do
if [[ ! -f "${INSTALLED_FILE}" ]]; then
echo "'halcompile --install' did not install '${INSTALLED_FILE}'"
exit 1
fi

MODE=$(stat --printf '%#03a\n' "${INSTALLED_FILE}")
if [[ $((MODE & 0111)) != '0' ]]; then
echo "installed file '${INSTALLED_FILE}' has incorrect permissions"
echo "expected no execute bits, got ${MODE}"
exit 1
fi
done

for HAL in *.hal; do
echo "testing $HAL"
BASE=$(basename $HAL .hal)
Expand Down
15 changes: 15 additions & 0 deletions tests/halcompile/userspace-count-names/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
#!/bin/sh
set -e

halcompile --install userspace_count_names.comp

INSTALLED_FILE="${EMC2_HOME}/bin/userspace_count_names"
if [[ ! -f "${INSTALLED_FILE}" ]]; then
echo "'halcompile --install' did not install '${INSTALLED_FILE}'"
exit 1
fi

MODE=$(stat --printf '%#03a\n' "${INSTALLED_FILE}")
if [[ $((MODE & 0111)) == '0' ]]; then
echo "installed file '${INSTALLED_FILE}' has incorrect permissions"
echo "expected *some* execute bit, got ${MODE}"
exit 1
fi

for HAL in *.hal; do
echo "testing $HAL"
BASE=$(basename $HAL .hal)
Expand Down