@@ -416,7 +416,6 @@ opt mingw-cross 0 "cross-compile for win32 using mingw"
416416opt clang 0 " prefer clang to gcc for building the runtime"
417417opt ccache 0 " invoke gcc/clang via ccache to reuse object files between builds"
418418opt local-rust 0 " use an installed rustc rather than downloading a snapshot"
419- opt pax-flags 0 " apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
420419opt inject-std-version 1 " inject the current compiler version of libstd into programs"
421420opt llvm-static-stdcpp 0 " statically link to libstdc++ for LLVM"
422421opt rpath 1 " build rpaths into rustc itself"
@@ -518,12 +517,6 @@ then
518517 fi
519518fi
520519
521- if [ " $CFG_OSTYPE " = " unknown-linux-gnu" ]
522- then
523- probe CFG_PAXCTL paxctl /sbin/paxctl
524- probe CFG_ZCAT zcat
525- fi
526-
527520step_msg " looking for target specific programs"
528521
529522probe CFG_ADB adb
@@ -546,51 +539,6 @@ then
546539 fi
547540fi
548541
549- if [ " $CFG_OSTYPE " = " unknown-linux-gnu" ]
550- then
551- if [ ! -z " $CFG_ENABLE_PAX_FLAGS " -a -z " $CFG_PAXCTL " ]
552- then
553- err " enabled PaX markings but no paxctl binary found"
554- fi
555-
556- if [ -z " $CFG_DISABLE_PAX_FLAGS " ]
557- then
558- # GRSecurity/PaX detection. This can be very flaky.
559- GRSEC_DETECTED=
560-
561- # /dev/grsec only exists if CONFIG_GRKERNSEC_NO_RBAC is not set.
562- # /proc/sys/kernel/grsecurity is not available if ÇONFIG_GRKERNSEC_SYSCTL is not set.
563- if [ -e /dev/grsec -o -d /proc/sys/kernel/grsecurity ]
564- then
565- GRSEC_DETECTED=1
566- # /proc/config.gz is normally only available to root, and only if CONFIG_IKCONFIG_PROC has been set.
567- elif [ -r /proc/config.gz -a ! -z " $CFG_ZCAT " ]
568- then
569- if " $CFG_ZCAT " /proc/config.gz | grep --quiet " CONFIG_GRKERNSEC=y"
570- then
571- GRSEC_DETECTED=1
572- fi
573- # Flaky.
574- elif grep --quiet grsec /proc/version
575- then
576- GRSEC_DETECTED=1
577- fi
578-
579- if [ ! -z " $GRSEC_DETECTED " ]
580- then
581- step_msg " GRSecurity: yes"
582- if [ ! -z " $CFG_PAXCTL " ]
583- then
584- CFG_ENABLE_PAX_FLAGS=1
585- else
586- warn " GRSecurity kernel detected but no paxctl binary found: not setting CFG_ENABLE_PAX_FLAGS"
587- fi
588- else
589- step_msg " GRSecurity: no"
590- fi
591- fi
592- fi
593-
594542BIN_SUF=
595543if [ " $CFG_OSTYPE " = " pc-mingw32" ] || [ " $CFG_OSTYPE " = " w64-mingw32" ]
596544then
@@ -942,16 +890,33 @@ then
942890 msg " git: submodule sync"
943891 " ${CFG_GIT} " submodule sync
944892
893+ msg " git: submodule init"
894+ " ${CFG_GIT} " submodule init
895+
896+ # Disable submodules that we're not using
897+ if [ ! -z " ${CFG_LLVM_ROOT} " ]; then
898+ msg " git: submodule deinit src/llvm"
899+ " ${CFG_GIT} " submodule deinit src/llvm
900+ fi
901+ if [ ! -z " ${CFG_JEMALLOC_ROOT} " ]; then
902+ msg " git: submodule deinit src/jemalloc"
903+ " ${CFG_GIT} " submodule deinit src/jemalloc
904+ fi
905+ if [ ! -z " ${CFG_LIBUV_ROOT} " ]; then
906+ msg " git: submodule deinit src/libuv"
907+ " ${CFG_GIT} " submodule deinit src/libuv
908+ fi
909+
945910 msg " git: submodule update"
946- " ${CFG_GIT} " submodule update --init
911+ " ${CFG_GIT} " submodule update
947912 need_ok " git failed"
948913
949914 msg " git: submodule foreach sync"
950915 " ${CFG_GIT} " submodule foreach --recursive ' if test -e .gitmodules; then git submodule sync; fi'
951916 need_ok " git failed"
952917
953918 msg " git: submodule foreach update"
954- " ${CFG_GIT} " submodule update --init -- recursive
919+ " ${CFG_GIT} " submodule update --recursive
955920 need_ok " git failed"
956921
957922 # NB: this is just for the sake of getting the submodule SHA1 values
0 commit comments