From e9597e572db084cb5fb0eb6b4f981bdcb7f57031 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Tue, 23 May 2023 01:02:04 +0900 Subject: [PATCH 1/2] gh-101282: Fix M4 style for BOLT configuration --- configure | 4 ++-- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 2b863be108be26..56d280419cc45e 100755 --- a/configure +++ b/configure @@ -8398,8 +8398,8 @@ $as_echo "$BOLT_INSTRUMENT_FLAGS" >&6; } $as_echo_n "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS=-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot - + BOLT_APPLY_FLAGS="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot + " fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 diff --git a/configure.ac b/configure.ac index 786d3414eb0e06..001eae8283590f 100644 --- a/configure.ac +++ b/configure.ac @@ -2087,7 +2087,7 @@ if test -z "${BOLT_APPLY_FLAGS}" then AS_VAR_SET( [BOLT_APPLY_FLAGS], - [m4_join([ ], + ["m4_join([ ], [-update-debug-sections], [-reorder-blocks=ext-tsp], [-reorder-functions=hfsort+], @@ -2103,7 +2103,7 @@ then [-dyno-stats], [-use-gnu-stack], [-frame-opt=hot] - )] + )"] ) fi AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) From 92fe9074dafcc6bcf55309e01bf71aa5e36afd38 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 24 May 2023 18:23:20 +0900 Subject: [PATCH 2/2] Address code review --- configure | 3 +-- configure.ac | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 56d280419cc45e..21a3af145c1369 100755 --- a/configure +++ b/configure @@ -8398,8 +8398,7 @@ $as_echo "$BOLT_INSTRUMENT_FLAGS" >&6; } $as_echo_n "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot - " + BOLT_APPLY_FLAGS=" -update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot " fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 diff --git a/configure.ac b/configure.ac index 001eae8283590f..c5a79af1a2e2eb 100644 --- a/configure.ac +++ b/configure.ac @@ -2087,23 +2087,23 @@ if test -z "${BOLT_APPLY_FLAGS}" then AS_VAR_SET( [BOLT_APPLY_FLAGS], - ["m4_join([ ], - [-update-debug-sections], - [-reorder-blocks=ext-tsp], - [-reorder-functions=hfsort+], - [-split-functions], - [-icf=1], - [-inline-all], - [-split-eh], - [-reorder-functions-use-hot-size], - [-peepholes=none], - [-jump-tables=aggressive], - [-inline-ap], - [-indirect-call-promotion=all], - [-dyno-stats], - [-use-gnu-stack], - [-frame-opt=hot] - )"] + [m4_normalize(" + -update-debug-sections + -reorder-blocks=ext-tsp + -reorder-functions=hfsort+ + -split-functions + -icf=1 + -inline-all + -split-eh + -reorder-functions-use-hot-size + -peepholes=none + -jump-tables=aggressive + -inline-ap + -indirect-call-promotion=all + -dyno-stats + -use-gnu-stack + -frame-opt=hot + ")] ) fi AC_MSG_RESULT([$BOLT_APPLY_FLAGS])