[all-commits] [llvm/llvm-project] 1ad0e6: [Driver, FreeBSD] Fix -pie for -r and -no-pie links...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Jul 20 01:38:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ad0e6989597f550e1a5b53abd889366b65aa6c7
      https://github.com/llvm/llvm-project/commit/1ad0e6989597f550e1a5b53abd889366b65aa6c7
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/FreeBSD.cpp
    M clang/lib/Driver/ToolChains/Serenity.cpp
    M clang/test/Driver/freebsd.c

  Log Message:
  -----------
  [Driver,FreeBSD] Fix -pie for -r and -no-pie links (#210663)

Port Gnu.cpp changes ae623d16d50c and cac82e26c642 to FreeBSD and
Serenity: -r should suppress -pie. -nopie, OpenBSD specific, should not
be used by other OSes.

Group the options selecting the link mode and place them after -m, as
gnutools::Linker does, so that -r suppresses -export-dynamic and
--hash-style as well, and -no-pie overrides the -fsanitize PIE default.

Drop --enable-new-dtags: default in modern linkers.

Change -Bstatic to -static to follow Gnu.cpp (identical in lld and older
GNU ld).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list