[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Weirdly, this leads to `warning: argument unused during compilation: > '-nopie'` rather than `error: unknown argument: '-nopie'` Marking `-nopie` as `TargetSpecific` should change this to an error. https://github.com/openbsd/src has some `-nopie` use cases that haven't

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-29 Thread Mike Hommey via cfe-commits
glandium wrote: Weirdly, this leads to `warning: argument unused during compilation: '-nopie'` rather than `error: unknown argument: '-nopie'` https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: Rebase to resolve a merge conflict. No change to the diff otherwise. https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/72578 >From 23eb2b42bfb0b7148497b9035615a14dc8b7e67c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 16 Nov 2023 14:09:09 -0800 Subject: [PATCH] [Driver] Make ELF -nopie specific to OpenBSD -no-pie[1]/-nopie

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Brad Smith via cfe-commits
https://github.com/brad0 approved this pull request. https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-20 Thread Brad Smith via cfe-commits
brad0 wrote: Continue with this as is. https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-17 Thread Brad Smith via cfe-commits
brad0 wrote: > > -nopie is for the linker. We only use -fno-pie for the compiler. > > OK. Then it seems that the driver option `-nopie` for linking should be > removed even for OpenBSD? Let me check something before I say anything further. https://github.com/llvm/llvm-project/pull/72578

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > -nopie is for the linker. We only use -fno-pie for the compiler. OK. Then it seems that the driver option `-nopie` for linking should be removed even for OpenBSD? https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-16 Thread Brad Smith via cfe-commits
brad0 wrote: -nopie is for the linker. We only use -fno-pie for the compiler. https://github.com/llvm/llvm-project/pull/72578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes -no-pie[1]/-nopie is rarely used and among the rare uses almost everwhere uses -no-pie, since GCC does not recognize -nopie. However, OpenBSD seems to prefer -nopie. Therefore, make -nopie specific to

[clang] [Driver] Make ELF -nopie specific to OpenBSD (PR #72578)

2023-11-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/72578 -no-pie[1]/-nopie is rarely used and among the rare uses almost everwhere uses -no-pie, since GCC does not recognize -nopie. However, OpenBSD seems to prefer -nopie. Therefore, make -nopie specific to OpenBSD to