]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Allow new-abi-baseline target to overwrite existing file
authorJonathan Wakely <jwakely@redhat.com>
Wed, 7 Jan 2026 14:29:44 +0000 (14:29 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 6 Feb 2026 09:54:14 +0000 (09:54 +0000)
There doesn't seem to be much benefit to writing the symbols to
baseline_symbols.txt.new when an existing file is already present. It
just adds a manual step for maintainers to move the .txt.new file to
replace the .txt one. Overwriting the file directly allows you to use
git diff to see what changed immediately, and you can easly use git
commands to revert to the original file too.

libstdc++-v3/ChangeLog:

* testsuite/Makefile.am (new-abi-baseline): Overwrite existing
file instead of creating baseline_symbols.txt.new.
* testsuite/Makefile.in: Regenerate.

libstdc++-v3/testsuite/Makefile.am
libstdc++-v3/testsuite/Makefile.in

index 270b6886df4c6eee1677dcb4b5c479bf217ba01e..e8b6eb9e8ad497330c0eaf97a23a8efde2bb0da7 100644 (file)
@@ -84,13 +84,7 @@ baseline_symbols:
 
 new-abi-baseline:
        -@$(mkinstalldirs) ${baseline_dir}/${baseline_subdir}
-       -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \
-         if test -f $${output}; then \
-           output=$${output}.new; \
-           t=`echo $${output} | sed 's=.*config/abi/=='`; \
-           echo "Baseline file already exists, writing to $${t} instead."; \
-         fi; \
-         ${extract_symvers} ../src/.libs/libstdc++.so $${output})
+       -@${extract_symvers} ../src/.libs/libstdc++.so ${baseline_dir}/${baseline_subdir}/baseline_symbols.txt
 
 %/site.exp: site.exp
        -@test -d $* || mkdir $*
index 65ec4e7fb146296bc180e64c0394605d380b9728..3aed09d104922d349f55499cfc9ce7e51be8775d 100644 (file)
@@ -645,13 +645,7 @@ baseline_symbols:
 
 new-abi-baseline:
        -@$(mkinstalldirs) ${baseline_dir}/${baseline_subdir}
-       -@(output=${baseline_dir}/${baseline_subdir}/baseline_symbols.txt; \
-         if test -f $${output}; then \
-           output=$${output}.new; \
-           t=`echo $${output} | sed 's=.*config/abi/=='`; \
-           echo "Baseline file already exists, writing to $${t} instead."; \
-         fi; \
-         ${extract_symvers} ../src/.libs/libstdc++.so $${output})
+       -@${extract_symvers} ../src/.libs/libstdc++.so ${baseline_dir}/${baseline_subdir}/baseline_symbols.txt
 
 %/site.exp: site.exp
        -@test -d $* || mkdir $*