From 84a3fda1c3d7608239fba324f866b7716b4b41f7 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 14 Jan 2018 10:26:43 +0000 Subject: [PATCH] Do not optimize binutils-pass1 in order to measure the SBU: - introduce REALSBU variable if Config.in and jhalfs, and display it - Adpat LFS/master.sh --- Config.in | 10 ++++++++++ LFS/master.sh | 6 +++++- common/libs/func_validate_configs.sh | 3 ++- jhalfs | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Config.in b/Config.in index 67e7bf0..24857ca 100644 --- a/Config.in +++ b/Config.in @@ -1211,6 +1211,15 @@ if !BOOK_CLFS2 && !BOOK_CLFS3 config OPT_3 bool "Cross tools (only MAKEFLAGS), temp tools and final system" if BOOK_CLFS endchoice + + config REALSBU + bool "Build Binutls pass1 without optimization (Real SBU)" + depends on (BOOK_LFS || BOOK_LFS_SYSD) && OPT_2 + default n + help + #-- Use -j1 in make invokation for Binutils pass1 to + # get a valid SBU value. + endmenu config OPTIMIZE int @@ -1219,6 +1228,7 @@ endmenu default "2" if OPT_2 default "3" if OPT_3 endif + #--- End Optimizations #-- Internal Settings diff --git a/LFS/master.sh b/LFS/master.sh index 8250d04..df06c66 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -131,7 +131,11 @@ chapter5_Makefiles() { # "uncommented" by the user LUSER_wrt_test_log "${this_script}" "$pkg_version" # If using optimizations, write the instructions - [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" + case "${OPTIMIZE}${this_script}${REALSBU}" in + *binutils-pass1y) ;; + 2*) wrt_optimize "$name" && wrt_makeflags "$name" ;; + *) ;; + esac fi # Insert date and disk usage at the top of the log file, the script run diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index 9cf7ea7..8c59c97 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -51,7 +51,7 @@ inline_doc local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT CONSOLE_MAP UNICODE KEYMAP" # Full list of books settings - local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot $ADVANCED_common" + local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot REALSBU $ADVANCED_common" local -r hlfs_PARAM_LIST="$HLFS_book $GENERAL_common $HLFS_build $ADVANCED_chroot $ADVANCED_common" local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common" local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common" @@ -156,6 +156,7 @@ inline_doc RETRYSRCDOWNLOAD) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; RETRYDOWNLOADCNT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; DOWNLOADTIMEOUT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;; + REALSBU) [[ "$OPTIMIZE" = "2" ]] && echo -e "`eval echo $PARAM_VALS`" ;; # Envars that requires some validation LUSER) echo -e "`eval echo $PARAM_VALS`" diff --git a/jhalfs b/jhalfs index 97687ed..a5dc2d6 100755 --- a/jhalfs +++ b/jhalfs @@ -144,6 +144,7 @@ SET_WARNINGS=${SET_WARNINGS:=n} SET_MISC=${SET_MISC:=n} SET_BLOWFISH=${SET_BLOWFISH:=n} UNICODE=${UNICODE:=n} +REALSBU=${REALSBU:=n} if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then NO_PROGRESS="#"