Re: [PATCH v2] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-26 Thread Fangrui Song via Gcc-patches
On Fri, May 26, 2023 at 12:11 AM Jan Beulich wrote: > > On 25.05.2023 18:11, Fangrui Song wrote: > > On 2023-05-25, Jan Beulich wrote: > >> On 25.05.2023 17:16, Fangrui Song wrote: > >>> --- a/gcc/doc/invoke.texi > >>> +++ b/gcc/doc/invoke.texi > >>> @@ -32942,9 +32942,10 @@ the cache line size.

Re: [RFC] Introduce -finline-memset-loops

2023-06-02 Thread Fangrui Song via Gcc-patches
On Fri, Jun 2, 2023 at 3:11 AM Alexandre Oliva via Gcc-patches wrote: > > On Jan 19, 2023, Alexandre Oliva wrote: > > > Would it make more sense to extend it, even constrained by the > > limitations mentioned above, or handle memset only? In the latter case, > > would it still make sense to adop

[PATCH v3] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-06-12 Thread Fangrui Song via Gcc-patches
When using -mcmodel=medium, large data objects larger than the -mlarge-data-threshold threshold are placed into large data sections (.lrodata, .ldata, .lbss and some variants). GNU ld and ld.lld 17 place .l* sections into separate output sections. If small and medium code model object files are m

Re: [PATCH v3] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-06-13 Thread Fangrui Song via Gcc-patches
On Mon, Jun 12, 2023 at 11:16 PM Jan Beulich wrote: > On 13.06.2023 05:28, Fangrui Song wrote: > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/i386/large-data.c > > @@ -0,0 +1,13 @@ > > +/* { dg-do compile } */ > > +/* { dg-require-effective-target lp64 } */ > > +/* { dg-options "-O2 -mcmode

Re: PING^2 [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2023-07-18 Thread Fangrui Song via Gcc-patches
On Thu, Nov 24, 2022 at 7:26 PM Kewen.Lin via Gcc-patches wrote: > > Hi Richard, > > on 2022/11/23 00:08, Richard Sandiford wrote: > > "Kewen.Lin" writes: > >> Hi Richard, > >> > >> Many thanks for your review comments! > >> > > on 2022/8/24 16:17, Kewen.Lin via Gcc-patches wrote: > >> Hi

Re: [PATCH v4] Introduce attribute sym

2023-07-21 Thread Fangrui Song via Gcc-patches
On Wed, Jul 19, 2023 at 4:12 PM Alexandre Oliva via Gcc-patches wrote: > > On Jul 18, 2023, Richard Biener wrote: > > > I think the __symver__ attribute does something similar already so > > maybe use __attribute__((__sym__("foo")))? > > Cool, thanks, that will do. Regstrapped on x86_64-linux-gn

[PATCH v4] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-08-01 Thread Fangrui Song via Gcc-patches
When using -mcmodel=medium, large data objects larger than the -mlarge-data-threshold threshold are placed into large data sections (.lrodata, .ldata, .lbss and some variants). GNU ld and ld.lld 17 place .l* sections into separate output sections. If small and medium code model object files are m

[PATCH] Remove legacy -gz=zlib-gnu

2022-06-30 Thread Fangrui Song via Gcc-patches
From: Fangrui Song SHF_COMPRESSED style zlib has been supported since binutils 2.26 and the legacy zlib-gnu option hasn't gain adoption. According to Debian Code Search (`gz=zlib-gnu`), no project uses -gz=zlib-gnu (valgrind has a configure to use -gz=zlib). Remove support for the legacy zlib-gnu

Re: [PATCH] Remove legacy -gz=zlib-gnu

2022-07-01 Thread Fangrui Song via Gcc-patches
On 2022-07-01, Andrew Pinski wrote: On Thu, Jun 30, 2022 at 11:58 PM Fangrui Song via Gcc-patches wrote: From: Fangrui Song SHF_COMPRESSED style zlib has been supported since binutils 2.26 and the legacy zlib-gnu option hasn't gain adoption. According to Debian Code Search (`gz=zli

Re: [PATCH] Mips: Enable asynchronous unwind tables with both ASAN and TSAN

2022-07-04 Thread Fangrui Song via Gcc-patches
On Mon, Jul 4, 2022 at 6:54 PM Xi Ruoyao via Gcc-patches wrote: > > On Mon, 2022-07-04 at 14:28 +, Dimitrije Milosevic wrote: > > On Saturday, June 11, 2022 2:03 PM, Xi wrote: > > > Just tried TSAN_SUPPORTED=yes with asynchronous unwind tables > > > enabled, > > > but I got some strange test f

Re: [PATCH] Revert "[PATCH] RISC-V: Use new linker emulations for glibc ABI."

2022-07-14 Thread Fangrui Song via Gcc-patches
e to add a compatibility no-op option. I appreciate anyone who wants to step up and helps removing eelf64lriscv_{lp64,ilp32f,...}. We will have "*64briscv*" variants and it will then look really ugly. On Wed, Jun 15, 2022 at 4:00 PM Fangrui Song via Gcc-patches wrote: This reverts co

Re: [PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-08-01 Thread Fangrui Song via Gcc-patches
On Mon, Aug 1, 2022 at 12:05 PM H.J. Lu via Gcc-patches wrote: > > On Thu, Jul 28, 2022 at 9:31 AM H.J. Lu wrote: > > > > On Thu, Jul 28, 2022 at 1:26 AM Alexandre Oliva wrote: > > > > > > On Jul 27, 2022, "H.J. Lu" wrote: > > > > > > > On Tue, Jul 26, 2022 at 10:14 PM Alexandre Oliva > > > >

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-08-09 Thread Fangrui Song via Gcc-patches
On Tue, Aug 9, 2022 at 7:00 AM Alexandre Oliva via Gcc-patches wrote: > > Ping? > > https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598276.html This is great! And hope https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398 can be re-considered, at least for some ports :) > On Jul 27, 2022, Alex

Re: [PATCH v4] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-08-22 Thread Fangrui Song via Gcc-patches
On Tue, Aug 1, 2023 at 12:51 PM Fangrui Song wrote: > > When using -mcmodel=medium, large data objects larger than the > -mlarge-data-threshold threshold are placed into large data sections > (.lrodata, .ldata, .lbss and some variants). GNU ld and ld.lld 17 place > .l* sections into separate outp

Re: [PATCH v3] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-06-23 Thread Fangrui Song via Gcc-patches
On Tue, Jun 13, 2023 at 2:49 PM Fangrui Song wrote: > On Mon, Jun 12, 2023 at 11:16 PM Jan Beulich wrote: > >> On 13.06.2023 05:28, Fangrui Song wrote: >> > --- /dev/null >> > +++ b/gcc/testsuite/gcc.target/i386/large-data.c >> > @@ -0,0 +1,13 @@ >> > +/* { dg-do compile } */ >> > +/* { dg-requi

Re: [PATCH] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-12 Thread Fangrui Song via Gcc-patches
On Wed, May 10, 2023 at 2:58 AM Uros Bizjak wrote: > > On Fri, Apr 28, 2023 at 2:47 AM Fangrui Song wrote: > > > > When using -mcmodel=medium, large data is placed into .l* sections. GNU ld > > places .l* sections into separate output sections. If small and medium > > code model object files ar

[PATCH v2] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-25 Thread Fangrui Song via Gcc-patches
When using -mcmodel=medium, large data objects larger than the -mlarge-data-threshold threshold are placed into large data sections (.lrodata, .ldata, .lbss and some variants). GNU ld and ld.lld 17 place .l* sections into separate output sections. If small and medium code model object files are m

Re: [PATCH v2] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-25 Thread Fangrui Song via Gcc-patches
On 2023-05-25, Jan Beulich wrote: On 25.05.2023 17:16, Fangrui Song wrote: --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -32942,9 +32942,10 @@ the cache line size. @samp{compat} is the default. @opindex mlarge-data-threshold @item -mlarge-data-threshold=@var{threshold} -When @option

Re: [PATCH] Remove legacy -gz=zlib-gnu

2022-09-21 Thread Fangrui Song via Gcc-patches
On Wed, Sep 21, 2022 at 12:37 AM Richard Biener wrote: > > On Tue, Sep 20, 2022 at 2:55 PM Martin Liška wrote: > > > > On 7/1/22 09:20, Fangrui Song via Gcc-patches wrote: > > > On 2022-07-01, Andrew Pinski wrote: > > >> On Thu, Jun 30, 2022 at 11:58 PM Fan

Re: [PATCH v2][DOCS] changes: mentioned ignore -gz=zlib-gnu option

2022-09-29 Thread Fangrui Song via Gcc-patches
On Thu, Sep 29, 2022 at 3:28 AM Martin Liška wrote: > Sending V2 where I included new -gz=zstd option value. > > Cheers, > Martin At some point binutils will want to remove --compress-debug-sections=zlib-gnu support as well. I think the message can drop mentioning of --compress-debug-sections=z

Re: [COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-29 Thread Fangrui Song via Gcc-patches
On Mon, Aug 29, 2022 at 1:16 PM Jose E. Marchesi via Gcc-patches wrote: > > > LLVM defines both __bpf__ and __BPF_ as target macros. > GCC was defining only __BPF__. > > This patch defines __bpf__ as a target macro for BPF. > Tested in bpf-unknown-none. > > gcc/ChangeLog: > > * config/bpf/

Re: [COMMITTED] bpf: define __bpf__ as well as __BPF__ as a target macro

2022-08-30 Thread Fangrui Song via Gcc-patches
On Tue, Aug 30, 2022 at 9:46 AM Jose E. Marchesi wrote: > > > > On Mon, Aug 29, 2022 at 1:16 PM Jose E. Marchesi via Gcc-patches > > wrote: > >> > >> > >> LLVM defines both __bpf__ and __BPF_ as target macros. > >> GCC was defining only __BPF__. > >> > >> This patch defines __bpf__ as a target ma

Re: [PATCH] LoongArch: add -mdirect-extern-access option

2022-09-03 Thread Fangrui Song via Gcc-patches
On Fri, Sep 2, 2022 at 4:31 AM Xi Ruoyao via Gcc-patches wrote: > > On Thu, 2022-09-01 at 18:54 +0800, Xi Ruoyao wrote: > > We'd like to introduce a new codegen option to align with the old > > "-Wa,-mla-global-with-pcrel" and avoid a performance & size regression > > building the Linux kernel wit

Re: [PATCH] LoongArch: add -mdirect-extern-access option

2022-09-04 Thread Fangrui Song via Gcc-patches
On Sun, Sep 4, 2022 at 12:00 AM Lulu Cheng wrote: > > > 在 2022/9/4 下午2:35, Xi Ruoyao 写道: > > On Sun, 2022-09-04 at 11:22 +0800, Lulu Cheng wrote: > >> 在 2022/9/4 上午10:51, Xi Ruoyao 写道: > >> > >>> On Sun, 2022-09-04 at 10:26 +0800, Lulu Cheng wrote: > >>> > If the above modifications are not a

[PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker

2020-02-09 Thread Fangrui Song via gcc-patches
PR driver/93645 * common.opt (-fuse-ld=): Delete -fuse-ld=[bfd|gold|lld]. Add -fuse-ld=. * opts.c (common_handle_option): Handle OPT_fuse_ld_. * gcc.c (driver_handle_option): Likewise. * collect2.c (main): Likewise. --- gcc/ChangeLog | 8 ++ gcc/c

Re: [PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker

2020-02-13 Thread Fangrui Song via gcc-patches
On 2020-02-09, Fangrui Song wrote: PR driver/93645 * common.opt (-fuse-ld=): Delete -fuse-ld=[bfd|gold|lld]. Add -fuse-ld=. * opts.c (common_handle_option): Handle OPT_fuse_ld_. * gcc.c (driver_handle_option): Likewise. * collect2.c (main): Likewise. --- gc

[PATCH] Align __patchable_function_entries to POINTER_SIZE

2020-01-07 Thread Fangrui Song via gcc-patches
Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93194 >From 60f489f2bf2b32afd1bdbb2405bb028dcedf82cc Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 Jan 2020 20:46:26 -0800 Subject: [PATCH] Align __patchable_function_entries to POINTER_SIZE To: gcc-patches@gcc.gnu.org --- gcc/Change

[PATCH] Add --enable-default-semantic-interposition to GCC configure

2021-06-06 Thread Fangrui Song via Gcc-patches
From: Fangrui Song --enable-default-semantic-interposition=no makes -fPIC default to -fno-semantic-interposition which enables interprocedural optimizations for default visibility non-vague-linkage function definitions. The suppression of interprocedural optimizations and inlining for such funct

[PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-05-11 Thread Fangrui Song via Gcc-patches
This was introduced in 2014-12 to use local binding for external symbols for -fPIE. Now that we have H.J. Lu's GOTPCRELX for years which mostly nullify the benefit of HAVE_LD_PIE_COPYRELOC, HAVE_LD_PIE_COPYRELOC should retire now. One design goal of -fPIE was to avoid copy relocations. HAVE_LD_PIE

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-05-11 Thread Fangrui Song via Gcc-patches
On 2021-05-12, Rainer Orth wrote: Hi Fangrui, Hi Rainer, for -fPIE. Now that we have H.J. Lu's GOTPCRELX for years which mostly nullify the benefit of HAVE_LD_PIE_COPYRELOC, HAVE_LD_PIE_COPYRELOC should retire now. Solaris/x86 ld doesn't support this, so HAVE_LD_PIE_COPYRELOC needs to stay.

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Fangrui Song via Gcc-patches
On Tue, Sep 5, 2023 at 5:14 AM Kito Cheng via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > committed, thanks :) > > On Tue, Sep 5, 2023 at 3:18 PM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 8/31/23 03:05, Kito Cheng wrote: > > > We only emit that on linux target before, that not prob

Re: [PATCH v4] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-09-13 Thread Fangrui Song via Gcc-patches
On Tue, Aug 22, 2023 at 12:19 AM Fangrui Song wrote: > > On Tue, Aug 1, 2023 at 12:51 PM Fangrui Song wrote: > > > > When using -mcmodel=medium, large data objects larger than the > > -mlarge-data-threshold threshold are placed into large data sections > > (.lrodata, .ldata, .lbss and some varian

Re: [PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker

2020-02-24 Thread Fangrui Song via gcc-patches
On 2020-02-13, Fangrui Song wrote: On 2020-02-09, Fangrui Song wrote: PR driver/93645 * common.opt (-fuse-ld=): Delete -fuse-ld=[bfd|gold|lld]. Add -fuse-ld=. * opts.c (common_handle_option): Handle OPT_fuse_ld_. * gcc.c (driver_handle_option): Likewise. *

[PING^3][PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker

2020-03-10 Thread Fangrui Song via Gcc-patches
On 2020-02-24, Fangrui Song wrote: On 2020-02-13, Fangrui Song wrote: On 2020-02-09, Fangrui Song wrote: PR driver/93645 * common.opt (-fuse-ld=): Delete -fuse-ld=[bfd|gold|lld]. Add -fuse-ld=. * opts.c (common_handle_option): Handle OPT_fuse_ld_. * gcc.c (driver

[PATCH] libstdc++: Fix the return type of __cxa_finalize according to the Itanium C++ ABI

2020-03-11 Thread Fangrui Song via Gcc-patches
Alternatively, we can delete it, because no user code should call it. It may be weird that libc is expected to define this function. This function is a language runtime interface that has nothing to do with a libc. --- libstdc++-v3/libsupc++/cxxabi.h | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v2] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-20 Thread Fangrui Song via Gcc-patches
If the value does not contain any path component separator (e.g. a slash), the linker will be searched for using COMPILER_PATH followed by PATH. Otherwise, it is either an absolute path or a path relative to the current working directory. --ld-path= complements and overrides -fuse-ld={bfd,gold,lld

[PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-24 Thread Fangrui Song via Gcc-patches
Attached v3 to address nits. On 2020-07-23, Martin Liška wrote: On 7/21/20 6:07 AM, Fangrui Song wrote: If the value does not contain any path component separator (e.g. a slash), the linker will be searched for using COMPILER_PATH followed by PATH. Otherwise, it is either an absolute path or a

Re: [PATCH] Generalize -fuse-ld= to support absolute path or arbitrary ld.linker

2020-04-05 Thread Fangrui Song via Gcc-patches
On 2020-03-11, Martin Liška wrote: On 2/10/20 1:02 AM, Fangrui Song via gcc-patches wrote: Hello. Thank you for the patch. You haven't received a review because we are right now in stage4 of the development cycle: https://gcc.gnu.org/develop.html#stage4 Thanks for the review! Accordi

[PATCH] Add -fsplit-dwarf

2020-05-12 Thread Fangrui Song via Gcc-patches
-fsplit-dwarf is similar to -gsplit-dwarf, but does not enable debugging information by itself. This makes it easier to be plugged into a build system without worrying that unnecessary debugging information may be generated. 2020-05-12 Fangrui Song PR debug/95096 * common.opt:

[PATCH] Don't make -gsplit-dwarf imply -g

2020-05-13 Thread Fangrui Song via Gcc-patches
On 2020-05-13, Eric Botcazou wrote: Did I mention I dislike -fsplit-dwarf? ;) Seconded, this will be confusing for almost all users. Since the option only affects debug info generation, it should be prefixed with 'g' in any case. Updating the semantics of -gsplit-dwarf is actually my favorit

[PATCH] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-19 Thread Fangrui Song via Gcc-patches
On 2020-04-06, Martin Liška wrote: On 4/6/20 12:32 AM, Fangrui Song wrote: On 2020-03-11, Martin Liška wrote: On 2/10/20 1:02 AM, Fangrui Song via gcc-patches wrote: Hello. Thank you for the patch. You haven't received a review because we are right now in stage4 of the development

[PATCH v2] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-20 Thread Fangrui Song via Gcc-patches
On 2020-05-20, Martin Liška wrote: Hello. Thanks for review. Sent PATCH v2. diff --git a/gcc/collect2.c b/gcc/collect2.c index f8a5ce45994..e04892cb91f 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -782,15 +782,16 @@ main (int argc, char **argv) USE_GOLD_LD, USE_BFD_LD,

[PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-21 Thread Fangrui Song via Gcc-patches
On 2020-05-21, Martin Liška wrote: On 5/21/20 1:52 AM, Fangrui Song wrote: The above issues motivated me to touch this line in PATCH v2. Dropped in PATCH v2. Thank you for the updated patch. The patch is fine except coding style issues: $ ./contrib/check_GNU_style.py /tmp/0001-Add-fuse-ld-to

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-05-28 Thread Fangrui Song via Gcc-patches
On 2020-05-25, Martin Liška wrote: On 5/22/20 6:42 AM, Fangrui Song wrote: but I can't fix this one because joining two lines will break the 80-column  rule. What about this: diff --git a/gcc/collect2.c b/gcc/collect2.c index cc57a20e08b..e5b54b080f7 100644 --- a/gcc/collect2.c +++ b/gcc/coll

Re: [PATCH v2] Add --ld-path= to specify an arbitrary executable as the linker

2021-01-14 Thread Fangrui Song via Gcc-patches
On 2021-01-14, Martin Liška wrote: On 1/14/21 11:07 AM, Richard Biener wrote: I see no particular reason to allow arbitrary garbage to be used as linker. It just asks for users to shoot themselves in the foot and for strange bugreports to pop up. Well, for a strange bug report, we'll see even

Re: [PATCH] AArch64: Add support for -mdirect-extern-access

2022-11-17 Thread Fangrui Song via Gcc-patches
On Thu, Nov 17, 2022 at 1:37 PM Andrew Pinski wrote: > > On Thu, Nov 17, 2022 at 1:21 PM maskray--- via Gcc-patches > wrote: > > > > > +.. option:: -mdirect-extern-access, -mno-direct-extern-access > > > + > > > + Use direct accesses for external data symbols. It avoids a GOT > > > indirection

Re: [PATCH] AArch64: Add support for -mdirect-extern-access

2022-11-17 Thread Fangrui Song via Gcc-patches
On Thu, Nov 17, 2022 at 1:55 PM Andrew Pinski wrote: > > On Thu, Nov 17, 2022 at 1:46 PM Fangrui Song wrote: > > > > On Thu, Nov 17, 2022 at 1:37 PM Andrew Pinski wrote: > > > > > > On Thu, Nov 17, 2022 at 1:21 PM maskray--- via Gcc-patches > > > wrote: > > > > > > > > > +.. option:: -mdirect-e

[PATCH] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-04-27 Thread Fangrui Song via Gcc-patches
When using -mcmodel=medium, large data is placed into .l* sections. GNU ld places .l* sections into separate output sections. If small and medium code model object files are mixed, the .l* sections won't cause relocation overflow pressure on sections in -mcmodel=small object files. However, when

Re: [PATCH] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-06 Thread Fangrui Song via Gcc-patches
On Thu, Apr 27, 2023 at 5:47 PM Fangrui Song wrote: > > When using -mcmodel=medium, large data is placed into .l* sections. GNU ld > places .l* sections into separate output sections. If small and medium > code model object files are mixed, the .l* sections won't cause > relocation overflow pres

[PATCH] x86: Use DW_EH_PE_indirect|DW_EH_PE_pcrel encodings for -fno-pic code

2023-01-31 Thread Fangrui Song via Gcc-patches
Follow aarch64 and riscv ports by using (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel for -fno-pic code. This avoids a canonical PLT entry for a personality reference in .eh_frame and a copy relocation for a typeinfo reference in .gcc_except_table, when the definition is in libstdc++.so.6. gc

Re: [PATCH] x86: Use DW_EH_PE_indirect|DW_EH_PE_pcrel encodings for -fno-pic code

2023-02-01 Thread Fangrui Song via Gcc-patches
> The above is incorrectly formatted, the GCC Coding Conventions say || etc. shouldn't be at the end of lines, but rather at the start of the next ones. Ack. > And, while I can understand the rationale for global cases > (though am not sure I agree, as currently the user can choose > by using -mn

[PATCH] Revert "[PATCH] RISC-V: Use new linker emulations for glibc ABI."

2022-06-15 Thread Fangrui Song via Gcc-patches
This reverts commit 37d57ac9a636f2235f9060e84fb8dd7968abd1dc. The resolution to https://sourceware.org/bugzilla/show_bug.cgi?id=22962 let GCC pass -m emulation to ld and let the ld emulation configure default library paths. This scheme is problematic: * It's not ld's business to specify default

[PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2022-06-15 Thread Fangrui Song via Gcc-patches
This was introduced in 2014-12 to use local binding for external symbols for -fPIE. It avoids a GOT indirection but the same optimizationis obtained with ld's R_X86_64_[REX_]GOTPCRELX optimization (albeit with slightly longer code). One design goal of -fPIE was to avoid copy relocations. HAVE_LD_

Re: [PATCH] Add -fextra-libc-function=memcmpeq for __memcmpeq

2022-06-15 Thread Fangrui Song via Gcc-patches
On Wed, Jun 15, 2022 at 2:44 PM H.J. Lu via Gcc-patches wrote: > > On Mon, Jun 13, 2022 at 9:01 AM Richard Biener > wrote: > > > > > > > > > Am 13.06.2022 um 16:36 schrieb H.J. Lu : > > > > > > On Mon, Jun 13, 2022 at 3:11 AM Richard Biener > > > wrote: > > >> > > >>> On Tue, Jun 7, 2022 at 9:0

Re: [PATCH] Revert "[PATCH] RISC-V: Use new linker emulations for glibc ABI."

2022-06-20 Thread Fangrui Song via Gcc-patches
ks for the good consideration. That said, I am unsure any distro uses this currently. I think some just work around the possibly non-existent paths by creating symlinks. Perhaps we should prioritize on fixing the scheme before distros start to rely on the behavior. > On Wed, Jun 15, 2022 at 4:00 PM Fa

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2022-06-20 Thread Fangrui Song via Gcc-patches
On Wed, Jun 15, 2022 at 2:34 AM Fangrui Song wrote: > > This was introduced in 2014-12 to use local binding for external symbols > for -fPIE. It avoids a GOT indirection but the same optimizationis > obtained with ld's R_X86_64_[REX_]GOTPCRELX optimization (albeit with > slightly longer code). >

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Fangrui Song via Gcc-patches
On Tue, Jun 21, 2022 at 1:43 AM Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches > wrote: > > > > > > Using g++ to link without libstdc++, as in g++.dg/abi/pure-virtual1.C, > > is error prone, because there's no way to tell g++ to drop libs

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Fangrui Song via Gcc-patches
On 2022-06-21, Richard Biener wrote: On Tue, Jun 21, 2022 at 9:53 AM Fangrui Song wrote: On Tue, Jun 21, 2022 at 1:43 AM Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches > wrote: > > > > > > Using g++ to link without libstdc++, as in g

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-22 Thread Fangrui Song via Gcc-patches
On Wed, Jun 22, 2022 at 4:29 PM Alexandre Oliva wrote: > > On Jun 22, 2022, Iain Sandoe wrote: > > > It makes some sense to have the option named -nostdlib++ if a target > > might add multiple libs (and/or make other changes) for linking C++. > > if it was nostdlibc++, I'd agree. lib++ is not so

Re: [PATCH 0/8] Stop using obsoleted egrep/fgrep

2022-06-24 Thread Fangrui Song via Gcc-patches
On 2022-06-24, Rainer Orth wrote: Hi Xi, On Fri, 2022-06-24 at 09:24 +0200, Rainer Orth wrote: please remember that there's a world outside of GNU grep: e.g. Solaris /bin/grep doesn't support grep -E (while /usr/xpg4/bin/grep does), so unconditionally replacing egrep with grep -E in several p

Re: Should -ffp-contract=off the default on GCC?

2023-03-24 Thread Fangrui Song via Gcc-patches
On Wed, Mar 22, 2023 at 8:52 AM Qing Zhao via Gcc-patches wrote: > > > > > On Mar 22, 2023, at 9:57 AM, Richard Biener via Gcc-patches > > wrote: > > > > On Wed, Mar 22, 2023 at 1:26 PM Alexander Monakov > > wrote: > >> > >> > >> On Wed, 22 Mar 2023, Richard Biener wrote: > >> > >>> I think it