diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk index a0cb9481c038c9f13ef0dd7dab3823e8e597405a..1bdbe97e7cbd7866247192ca1bf8bfb0e2cd97c5 100644 --- a/make/common/Defs.gmk +++ b/make/common/Defs.gmk @@ -704,7 +704,20 @@ endif # Install of imported file (JDK_IMPORT_PATH, or some other external location) define install-import-file @$(ECHO) "ASSEMBLY_IMPORT: $@" -$(install-file) +$(prep-target) +$(CP) $< $@ +@if [ "$(PLATFORM)" = "linux" -a "$(@F)" = "libjvm.so" ] ; then \ + if [ -x /usr/sbin/selinuxenabled ] ; then \ + /usr/sbin/selinuxenabled; \ + if [ $$? = 0 ] ; then \ + $(ECHO) "/usr/bin/chcon -t textrel_shlib_t $@"; \ + /usr/bin/chcon -t textrel_shlib_t $@; \ + if [ $$? != 0 ]; then \ + echo "ERROR: Cannot chcon $@"; \ + fi; \ + fi; \ + fi; \ +fi endef .PHONY: all build clean clobber