[Bug Report] Git fails to compile with fortify-headers and LTO - error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time
From: Immolo <hidden>
Date: 2023-07-18 23:07:33
Hi, I'm currently testing Gentoo Hardened build using Musl and fortify-headers which has has lead me to discover git (2.41.0) will not compile when GCC has been built with fortify-headers - https://github.com/jvoisin/fortify-headers and -flto enabled in CFLAGS, it will however compile fine if you remove the -flto. I've included what I think is the important bit below but will also attach a full build log and system information to hopefully give more of a hint for possible causes. aarch64-gentoo-linux-musl-gcc -o attr.o -c -MF ./.depend/attr.o.d -MQ attr.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -DETC_GITATTRIBUTES='"/etc/gitattributes"' attr.c rm -f libgit.a && aarch64-gentoo-linux-musl-ar rcs libgit.a abspath.o add-interactive.o add-patch.o advice.o alias.o alloc.o apply.o archive-tar.o archive-zip.o archive.o attr.o base85.o bisect.o blame.o blob.o bloom.o branch.o bulk-checkin.o bundle-uri.o bundle.o cache-tree.o cbtree.o chdir-notify.o checkout.o chunk-format.o color.o column.o combine-diff.o commit-graph.o commit-reach.o commit.o compat/nonblock.o compat/obstack.o compat/terminal.o compat/zlib-uncompress2.o config.o connect.o connected.o convert.o copy.o credential.o csum-file.o ctype.o date.o decorate.o delta-islands.o diagnose.o diff-delta.o diff-merges.o diff-lib.o diff-no-index.o diff.o diffcore-break.o diffcore-delta.o diffcore-order.o diffcore-pickaxe.o diffcore-rename.o diffcore-rotate.o dir-iterator.o dir.o editor.o entry.o environment.o ewah/bitmap.o ewah/ewah_bitmap.o ewah/ewah_io.o ewah/ewah_rlw.o exec-cmd.o fetch-negotiator.o fetch-pack.o fmt-merge-msg.o fsck.o fsmonitor.o fsmonitor-ipc.o fsmonitor-settings.o gettext.o git-zlib.o gpg-interface.o graph.o grep.o hash-lookup.o hashmap.o help.o hex.o hook.o ident.o json-writer.o kwset.o levenshtein.o line-log.o line-range.o linear-assignment.o list-objects-filter-options.o list-objects-filter.o list-objects.o ll-merge.o lockfile.o log-tree.o ls-refs.o mailinfo.o mailmap.o match-trees.o mem-pool.o merge-blobs.o merge-ort.o merge-ort-wrappers.o merge-recursive.o merge.o midx.o name-hash.o negotiator/default.o negotiator/noop.o negotiator/skipping.o notes-cache.o notes-merge.o notes-utils.o notes.o object-file.o object-name.o object.o oid-array.o oidmap.o oidset.o oidtree.o pack-bitmap-write.o pack-bitmap.o pack-check.o pack-mtimes.o pack-objects.o pack-revindex.o pack-write.o packfile.o pager.o parallel-checkout.o parse-options-cb.o parse-options.o patch-delta.o patch-ids.o path.o pathspec.o pkt-line.o preload-index.o pretty.o prio-queue.o progress.o promisor-remote.o prompt.o protocol.o protocol-caps.o prune-packed.o quote.o range-diff.o reachable.o read-cache.o rebase-interactive.o rebase.o ref-filter.o reflog-walk.o reflog.o refs.o refs/debug.o refs/files-backend.o refs/iterator.o refs/packed-backend.o refs/ref-cache.o refspec.o remote.o replace-object.o repo-settings.o repository.o rerere.o reset.o resolve-undo.o revision.o run-command.o send-pack.o sequencer.o serve.o server-info.o setup.o shallow.o sideband.o sigchain.o sparse-index.o split-index.o stable-qsort.o strbuf.o streaming.o string-list.o strmap.o strvec.o sub-process.o submodule-config.o submodule.o symlinks.o tag.o tempfile.o thread-utils.o tmp-objdir.o trace.o trace2.o trace2/tr2_cfg.o trace2/tr2_cmd_name.o trace2/tr2_ctr.o trace2/tr2_dst.o trace2/tr2_sid.o trace2/tr2_sysenv.o trace2/tr2_tbuf.o trace2/tr2_tgt_event.o trace2/tr2_tgt_normal.o trace2/tr2_tgt_perf.o trace2/tr2_tls.o trace2/tr2_tmr.o trailer.o transport-helper.o transport.o tree-diff.o tree-walk.o tree.o unpack-trees.o upload-pack.o url.o urlmatch.o usage.o userdiff.o utf8.o varint.o version.o versioncmp.o walker.o wildmatch.o worktree.o wrapper.o write-or-die.o ws.o wt-status.o xdiff-interface.o unix-socket.o unix-stream-server.o compat/simple-ipc/ipc-shared.o compat/simple-ipc/ipc-unix-socket.o block-sha1/sha1.o sha256/block/sha256.o compat/linux/procinfo.o compat/fopen.o compat/strlcpy.o compat/qsort_s.o compat/regex/regex.o aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-remote-http -Wl,-O1 -Wl,--as-needed remote-curl.o http.o http-walker.o common-main.o \ -lcurl -lexpat libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt /usr/include/fortify/stdio.h: In function 'process_curl_messages': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http.c:356:33: note: called from here 356 | fprintf(stderr, "Received DONE message for unknown request!\n"); | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccOJlMgC.mk:2: /var/tmp/portage/dev-vcs/git-2.41.0/temp/ccDMkIll.ltrans0.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/lib/gcc/aarch64-gentoo-linux-musl/13/../../../../aarch64-gentoo-linux-musl/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make: *** [Makefile:2826: git-remote-http] Error 1 make: *** Waiting for unfinished jobs.... aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-http-backend -Wl,-O1 -Wl,--as-needed http-backend.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-http-push -Wl,-O1 -Wl,--as-needed http.o http-push.o common-main.o \ -lcurl -lexpat libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt /usr/include/fortify/stdio.h: In function 'process_curl_messages': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http.c:356:33: note: called from here 356 | fprintf(stderr, "Received DONE message for unknown request!\n"); | ^ In function 'remove_locks', inlined from 'remove_locks_on_signal' at http-push.c:1008:2: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:998:9: note: called from here 998 | fprintf(stderr, "Removing remote locks...\n"); | ^ In function 'start_fetch_loose', inlined from 'fill_active_slot' at http-push.c:619:4, inlined from 'fill_active_slot' at http-push.c:610:12: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:275:17: note: called from here 275 | fprintf(stderr, "Unable to start GET request\n"); | ^ /usr/include/fortify/stdio.h: In function 'remote_ls': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1179:17: note: called from here 1179 | fprintf(stderr, "Unable to start PROPFIND request\n"); | ^ In function 'start_fetch_packed', inlined from 'finish_request' at http-push.c:585:4, inlined from 'process_response' at http-push.c:252:2: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:350:17: note: called from here 350 | fprintf(stderr, "Unable to start GET request\n"); | ^ In function 'fetch_indices', inlined from 'cmd_main' at http-push.c:1799:3: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:707:17: note: called from here 707 | fprintf(stderr, "Getting pack list\n"); | ^ /usr/include/fortify/stdio.h: In function 'cmd_main': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1803:9: note: called from here 1803 | fprintf(stderr, "Fetching remote heads...\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1803:9: note: called from here 1803 | fprintf(stderr, "Fetching remote heads...\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1825:17: note: called from here 1825 | fprintf(stderr, "No refs in common and none specified; doing nothing.\n"); | ^ In function 'update_remote', inlined from 'cmd_main' at http-push.c:1941:19: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1408:17: note: called from here 1408 | fprintf(stderr, "Unable to start PUT request\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1408:17: note: called from here 1408 | fprintf(stderr, "Unable to start PUT request\n"); | ^ /usr/include/fortify/stdio.h: In function 'cmd_main': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1945:25: note: called from here 1945 | fprintf(stderr, " done\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1957:25: note: called from here 1957 | fprintf(stderr, "Updating remote server info\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-push.c:1961:25: note: called from here 1961 | fprintf(stderr, "Unable to update server info\n"); | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccoLhbGi.mk:2: /var/tmp/portage/dev-vcs/git-2.41.0/temp/ccpBKicl.ltrans0.ltrans.o] Error 1 make[1]: *** Waiting for unfinished jobs.... /usr/include/fortify/stdio.h: In function 'die': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ usage.c:178:17: note: called from here 178 | fputs("fatal: recursion detected in die handler\n", stderr); | ^ /usr/include/fortify/stdio.h: In function 'die_errno': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ usage.c:217:17: note: called from here 217 | fputs("fatal: recursion detected in die_errno handler\n", | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccoLhbGi.mk:32: /var/tmp/portage/dev-vcs/git-2.41.0/temp/ccpBKicl.ltrans10.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/lib/gcc/aarch64-gentoo-linux-musl/13/../../../../aarch64-gentoo-linux-musl/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make: *** [Makefile:2816: git-http-push] Error 1 aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-daemon -Wl,-O1 -Wl,--as-needed daemon.o common-main.o libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-imap-send -Wl,-O1 -Wl,--as-needed imap-send.o http.o common-main.o \ -lcurl -lssl -lcrypto libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt aarch64-gentoo-linux-musl-gcc -march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -flto -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"aarch64\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC -DSHA1_BLK -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -Icompat/regex -DSHELL_PATH='"/bin/sh"' -o git-http-fetch -Wl,-O1 -Wl,--as-needed http.o http-walker.o http-fetch.o common-main.o \ -lcurl libgit.a xdiff/lib.a reftable/libreftable.a libgit.a -lpcre2-8 -lz -lpthread -lrt /usr/include/fortify/stdio.h: In function 'process_curl_messages': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http.c:356:33: note: called from here 356 | fprintf(stderr, "Received DONE message for unknown request!\n"); | ^ In function 'fetch_using_walker', inlined from 'cmd_main' at http-fetch.c:167:9: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ http-fetch.c:39:17: note: called from here 39 | fprintf(stderr, | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccAJioOg.mk:2: /var/tmp/portage/dev-vcs/git-2.41.0/temp/cceiDfck.ltrans0.ltrans.o] Error 1 make[1]: *** Waiting for unfinished jobs.... /usr/include/fortify/stdio.h: In function 'die': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ usage.c:178:17: note: called from here 178 | fputs("fatal: recursion detected in die handler\n", stderr); | ^ /usr/include/fortify/stdio.h: In function 'die_errno': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ usage.c:217:17: note: called from here 217 | fputs("fatal: recursion detected in die_errno handler\n", | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccAJioOg.mk:26: /var/tmp/portage/dev-vcs/git-2.41.0/temp/cceiDfck.ltrans8.ltrans.o] Error 1 In function 'create_ref_symlink', inlined from 'create_symref_locked' at refs/files-backend.c:1914:30, inlined from 'files_create_symref' at refs/files-backend.c:1950:8: /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ refs/files-backend.c:1888:17: note: called from here 1888 | fprintf(stderr, "no symlink - falling back to symbolic ref\n"); | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccAJioOg.mk:17: /var/tmp/portage/dev-vcs/git-2.41.0/temp/cceiDfck.ltrans5.ltrans.o] Error 1 /usr/include/fortify/stdio.h: In function 'verify_cache': /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ cache-tree.c:175:33: note: called from here 175 | fprintf(stderr, "...\n"); | ^ /usr/include/fortify/stdio.h:59:28: error: inlining failed in call to 'always_inline' 'fwrite': function body can be overwritten at link time 59 | _FORTIFY_FN(fwrite) size_t fwrite(const void *__d, size_t __n, size_t __m, FILE *__f) | ^ cache-tree.c:204:33: note: called from here 204 | fprintf(stderr, "...\n"); | ^ make[1]: *** [/var/tmp/portage/dev-vcs/git-2.41.0/temp/ccAJioOg.mk:32: /var/tmp/portage/dev-vcs/git-2.41.0/temp/cceiDfck.ltrans10.ltrans.o] Error 1 lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/lib/gcc/aarch64-gentoo-linux-musl/13/../../../../aarch64-gentoo-linux-musl/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status make: *** [Makefile:2813: git-http-fetch] Error 1 Many thanks, Immolo
Attachments
- system.txt [text/plain] 5620 bytes · preview
- git-lto-fort.log [text/x-log] 271967 bytes · preview