[pushed] Darwin, debug : Switch to DWARF 3 or 4 when dsymutil supports it.

2023-09-18 Thread Iain Sandoe via Gcc-patches
Tested on i686, x86_64 and aarch64 Darwin, also on x86_64 and aarch64 Linux. Having said this, some fallout might well be expected on Darwin since the consumers have not had much use with GCC output where the DWARF version is > 2, we will have to tackle that as it arises. pushed to trunk, thanks,

[pushed] configure, Darwin: Adjust handing of stdlib option.

2023-09-18 Thread Iain Sandoe via Gcc-patches
This has been in use for some time on Darwin branches, tested also on x86_64 and aarch64 linux gnu, pushed to trunk, thanks Iain --- 8< --- The intent of the configuration choices for -stdlib is that default setting should choose reasonable options for the target. This should enable -stdlib=

[pushed] Darwin: Partial reversion of r14-3648 (Inits Section).

2023-09-10 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and i686-darwin9 with both dwarfutils and llvm-based dsymutil implementations. Pushed to trunk, thanks Iain --- 8< --- Although the Darwin ABI places both hot and cold partitions in the same section (the linker can partition by name), this does not work with the

[pushed] Darwin, ppc: Add system stubs for all 32b PPC

2023-09-04 Thread Iain Sandoe via Gcc-patches
Tested on powerpc-darwin9, pushed to trunk, thanks Iain --- 8< --- This is a minor adjustment to make the GCC behaviour better match the old system tools. Signed-off-by: Iain Sandoe gcc/ChangeLog: * config/rs6000/darwin.h (LIB_SPEC): Include libSystemStubs for all 32b Darwin

[PATCH] Darwin: Place global inits in the correct section.

2023-09-04 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21, i686-darwin9, aarch64-darwin21 and powerpc-darwin9, pushed to trunk, thanks Iain --- 8< --- This handles placement of global initializers into __TEXT,__StaticInit as used by other platform toolchains. Signed-off-by: Iain Sandoe gcc/ChangeLog: *

[pushed] Darwin: Match system sections and relocs for exception tables.

2023-09-04 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and i686-darwin9, pushed to trunk, thanks, Iain --- 8< --- System tools from Darwin10 onwards have moved the exceptions tables from the __DATA segment to the __TEXT one. They also revised the relocations used for typeinfo. While Darwin9 was not changed at the time, in

[pushed] Darwin, machopic: Debug printer for macho symbol flags.

2023-09-04 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and i686-darwin9, pushed to trunk, thanks. Iain --- 8< --- There are now quite a few symbol flags, so it is sometimes useful to get them in a text form, rather than decoding the hex number printed by debug_rtx(). Signed-off-by: Iain Sandoe gcc/ChangeLog: *

Re: [PATCH] Testsuite: fix analyzer tests on Darwin

2023-08-19 Thread Iain Sandoe via Gcc-patches
Hi FX, thanks for chasing these fails down, > On 19 Aug 2023, at 22:28, FX Coudert wrote: > > gcc.dg/analyzer/ currently has 80 failures on Darwin (both > x86_64-apple-darwin and aarch64-apple-darwin). All those come from two issues: > > 1. Many tests use memset() without including the

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-08-18 Thread Iain Sandoe via Gcc-patches
> On 18 Aug 2023, at 23:59, Joseph Myers wrote: > > On Fri, 18 Aug 2023, Iain Sandoe via Gcc-patches wrote: > >> There is quite extensive Apple Developer documentation on delivering >> packages with co-installed libraries using @rpath (that is the intended >>

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-08-18 Thread Iain Sandoe via Gcc-patches
Hi Joseph, > On 18 Aug 2023, at 21:17, Joseph Myers wrote: > > On Tue, 15 Aug 2023, FX Coudert via Gcc-patches wrote: > >> I am currently retesting the patches on various archs (Linux and Darwin) >> after a final rebase, but various previous versions were >> regression-tested, and have been

[pushed] modula-2, plugin: Fix Darwin bootstrap issues.

2023-08-13 Thread Iain Sandoe via Gcc-patches
Tested on x86_64 Darwin and x86_64 Linux, pushed to master, will also backport to 13 if it is needed there, thanks Iain --- 8< --- This corrects some typos in the suffix of the m2rte pluing that lead to a bootstrap fail on Darwin, where the suffix is not '.so'. On some versions of Darwin, the

[pushed] Darwin: Handle linker '-demangle' option.

2023-07-21 Thread Iain Sandoe via Gcc-patches
Tested with Darwin linker versions that do/do not support the option and on x86_64-linux-gnu, pushed to trunk, thanks Iain --- 8< --- Most of the Darwin linkers in use support this option which we will now pass by default (matching the Xcode clang impl.)> Signed-off-by: Iain Sandoe

[pushed] Darwin: Use -platform_version when available [PR110624].

2023-07-13 Thread Iain Sandoe via Gcc-patches
tested on i688, x86_64 Darwin versions with/without support for the platform_version flag. Checked by Rainer on macOS14. Pushed to trunk thanks, Iain --- 8< --- Later versions of the static linker support a more flexible flag to describe the OS, OS version and SDK used to build the code. This

[pushed] testsuite, Darwin: Remove an unnecessary flags addition.

2023-07-03 Thread Iain Sandoe via Gcc-patches
This has been in use for some time in the Darwin branches that are used by downstream distributions. Re-tested on x86_64-darwin, pushed to trunk, thanks, Iain --- 8< --- The addition of the multiply_defined suppress flag has been handled for some considerable time now in the Darwin specs; remove

[pushed] Darwin, Objective-C: Support -fconstant-cfstrings [PR108743].

2023-07-02 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin and with make pdf and an examination of the revised output. Pushed to trunk, thanks Iain --- 8< --- This support the -fconstant-cfstrings option as used by clang (and expect by some build scripts) as an alias to the target-specific -mconstant-cfstrings. The

[PATCH] libphobos: Handle Darwin Arm and AArch64 in fibre context asm.

2023-07-02 Thread Iain Sandoe via Gcc-patches
Tested on AArch64 (Arm64) Darwin on 11.x, 13.x and master, OK for trunk? and backports? thanks Iain --- 8< --- This code currently fails to build because it contains ELF- specific directives. This patch excludes those directives when the platform is Darwin. We do not expect switching fibres

[pushed] libphobos, testsuite: Disable forkgc2 on Darwin [PR103944]

2023-07-01 Thread Iain Sandoe via Gcc-patches
From: Iain Sandoe This has been in use for some time across all the Darwin version supported by D. It has also been tested on x86_64-linux-gnu. Approved on irc by Iain Buclaw, pushed to main (and will be backported). thanks Iain --- 8< --- It hangs the testsuite (requiring manual

Re: [PATCH] configure: Implement --enable-host-bind-now

2023-06-27 Thread Iain Sandoe via Gcc-patches
> On 27 Jun 2023, at 16:31, Marek Polacek via Gcc-patches > wrote: > > On Tue, Jun 27, 2023 at 01:39:16PM +0200, Martin Jambor wrote: >> Hello, >> >> On Tue, May 16 2023, Marek Polacek via Gcc-patches wrote: >>> As promised in the --enable-host-pie patch, this patch adds another >>>

[PATCH] modula-2: Amend the handling of failed select() calls in RTint [PR108835].

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on various affected Darwin versions and on x86_64-linux-gnu OK for trunk? OK for 13.2? thanks Iain --- 8< --- When we make a select() that fails, there is an attempt to (a) diagnose why and (b) make a fallback. These actions are causing some tests to hang on some Darwin versions, this is

[pushed] configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on i686, powerpc, x86_64 and aarch64 darwin (for versions requiring PIE and also some that default to non-PIE). Also tested on x86_64-linux-gnu with and without --enable-host-pie. pushed to master, thanks Iain --- 8< --- The latest versions of Darwin on the Aarch64 platform mandate

[pushed] testsuite,objective-c++: Fix imported NSObjCRuntime.h.

2023-06-23 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin, pushed to trunk, thanks Iain --- 8< --- We have imported some headers from the GNUStep project to allow us to maintain the testsuite independent to changing versions of system headers. One of these headers has a macro that (now we have support for __has_feature) expands

[pushed] Darwin, PPC: Fix struct layout with pragma pack [PR110044].

2023-06-02 Thread Iain Sandoe via Gcc-patches
@David: I am not sure what sets the ABI on AIX (for Darwin, it is effectively "whatever the system compiler [Apple gcc-4] does") but from an inspection of the code, it seems that (if the platform should honour #pragma pack) a similar effect could be present there too. Tested on

Re: [PATCH 1/3] testsuite: Unbork multilib testing on RISC-V (and any target really)

2023-05-31 Thread Iain Sandoe via Gcc-patches
> On 31 May 2023, at 18:57, Jeff Law via Gcc-patches > wrote: > > > > On 5/31/23 10:25, Vineet Gupta wrote: >> Multilib testing on trunk is currently busted (and surprisingly this >> affects any/all targets but it seems nobody cares). We currently get the >> following splat: > I wouldn't

[pushed] libobjc: Add local macros to support encode generation [P109913].

2023-05-22 Thread Iain Sandoe via Gcc-patches
This fixes bootstrap on powerpc-darwin, and was tested there for both GNU and NeXT Objective-C testsuite. Approved in the PR by Andrew, pushed to trunk, thanks, Iain --- 8< --- r14-976-g9907413a3a6aa3 alters code to use the preferred _P-style macros rather than direct comparisons of (for

[pushed] Darwin, libgcc : Adjust min version supported for the OS.

2023-05-19 Thread Iain Sandoe via Gcc-patches
Tested across the Darwin range (this patch has been on the WIP branches for some time) and on x86_64-linux-gnu, for reference. pushed to trunk, thanks Iain --- 8< --- Tools from later versions of the OS deprecate or fail to support earlier OS revisions. Signed-off-by: Iain Sandoe

[pushed] libsanitizer, darwin: Unsupport Darwin >= 22 for now.

2023-04-18 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21,22, pushed to trunk, needed on 13.1, thanks Iain --- 8< --- The mechanism for location dyld has altered from Darwin22 since dyld is now in the shared cache. The implemented mechanism for walking the cache uses Apple Blocks which GCC does not yet support, and the

[PATCH] c++, coroutines: Fix block nests when the function has no top-level bind.

2023-04-06 Thread Iain Sandoe via Gcc-patches
I spotted this problem while trying to collate my WIP patches (sorry for not spotting it when the original patch was discussed). Although we do not yet have any regression filed against this (AFAIK), it's only a matter of time - so I'd suggest that we should apply to 13. Tested on

[PATCH] c++, coroutines: Stabilize names of promoted slot vars [PR101118].

2023-03-26 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21, x86-64-linux-gnu OK for trunk? Iain When we need to 'promote' a value (i.e. store it in the coroutine frame) it is given a frame entry name. This was based on the DECL_UID for slot vars. However, when LTO is used, the names from multiple TUs become visible at the same

Re: [PATCH v2 0/5] A small Texinfo refinement

2023-03-10 Thread Iain Sandoe via Gcc-patches
Hi all, > On 9 Mar 2023, at 23:35, Sandra Loosemore via Gcc-patches > wrote: > > On 3/9/23 01:26, Richard Biener wrote: > >> SLES 12 has texinfo 4.13a, SLES 15 has texinfo 6.5. We still provide >> up-to-date GCC for SLES 12 but we can probably manage in some ways >> when the texinfo

[pushed] testsuite, objective-c: Cater for Windows intptr type.

2023-02-16 Thread Iain Sandoe via Gcc-patches
Tested by nightstrike on Windows, and on x86_64 Linux and Darwin and i686-darwin, pushed to trunk, thanks Iain --- 8< --- This adjusts the diagnostic output matches to cater for the differences in intptr types on Windows. Patch from 'nightstrike'. Signed-off-by: Iain Sandoe

[pushed] testsuite, objective-c: Fix a testcase on Windows.

2023-02-15 Thread Iain Sandoe via Gcc-patches
tested by 'nightstrike' on Windows, and on x86_64-darwin21, pushed to master, thanks, Iain --- 8< --- Windows needs to use uintptr_t to represent an integral pointer type (long is not the right type there). Patch from 'nightstike'. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog:

[PATCH] driver, toplevel: Avoid emitting the version information twice.

2023-01-29 Thread Iain Sandoe via Gcc-patches
Technically, this is seems to be a regression somewhere between 4.2 and 4.6 but, it seems, not enough for anyone to care too much. Tested on various Darwin versions and x86_64, powerpc64 linux, OK for trunk {now,stage1}? thanks, Iain --- 8< --- For a regular compile job, with -v we emit the GCC

[pushed] Modula-2: Claim Wreturn-type in lang.opt.

2023-01-28 Thread Iain Sandoe via Gcc-patches
Now we claim options for Modula-2 in m2/lang.opt we need to add those used for warnings too. This fixes: FAIL: gm2/warnings/returntype/pass/Termbase.mod FAIL: gm2/warnings/returntype/pass/goodreturn.mod FAIL: gm2/warnings/returntype/pass/keypressedsimple.mod all with -O0 -g -Werror=return-type

[PATCH] Modula-2: Add claimed command line options to lang.opt [PR108555].

2023-01-26 Thread Iain Sandoe via Gcc-patches
This has been retested on x86_64, powerpc64 linux-gnu (with 32b multilibs) on i686, powerpc darwin (with 64b multilibs), x86_64 darwin with and without 32b multilibs, OK for trunk? thanks Iain --- 8< --- This is a partial reversion of the changes in r13-5373-g80cf2c5e8f496b. As

[pushed] Modula-2: Remove debug code [PR108553].

2023-01-26 Thread Iain Sandoe via Gcc-patches
Bootstrapped on x86_64-darwin, and the patch was confirmed as fixing the issue in the PR. Pushed to trunk as obvious, thanks, Iain --- 8< --- Remove debugging code accidentally left in place in r13-5373-g80cf2c5e8f496b. Signed-off-by: Iain Sandoe PR modula2/108553 gcc/m2/ChangeLog:

[PATCH] modula-2: Fixes for preprocessing [PR102343, PR108182]

2023-01-25 Thread Iain Sandoe via Gcc-patches
Tested on x86_64, powerpc64 - linux-gnu (with 32b multilibs), i686, powerpc darwin (with 64b multilibs) x86_64 darwin (with and without 32b multilib). OK for trunk? thanks Iain --- 8< --- Modula-2 uses the C preprocessor to implement handling for conditional code and macros. However, this is

[PATCH] Modula-2, testsuite: Remove use of concatenated paths.

2023-01-22 Thread Iain Sandoe via Gcc-patches
tested on x86_64-darwin21 with an updated compiler that does not support the path concatentation and on an unpatched trunk. OK for trunk? thanks Iain --- 8< --- The original implementation for Modula-2 search paths allows things like '-I/path/a:/path/b'. Such paths are not compatible with the

[pushed] Darwin, libffi, testsuite: Ensure we pick up the convenience lib.

2023-01-22 Thread Iain Sandoe via Gcc-patches
Tested on i686, powerpc, x86_64, Arm64 Darwin, x86_64-linux-gnu, pushed to trunk, thanks, Iain --- 8< --- For several Darwin linker versions, the link paths are first traversed looking for shared libraries, and then again looking for archives. We want the paths to be searched for both shared

[PATCH] Darwin, fixincludes: Handle Apple Blocks in objc/runtime.h.

2023-01-21 Thread Iain Sandoe via Gcc-patches
tested on i686-darwin9, x86_64-darwin19,20,21 x86_64-linux-gnu, pushed to trunk, thanks Iain --- 8< --- The macOS 13 SDK has unguarded Apple Blocks use in objc/runtime.h which causes most of the objective-c tests to fail. Signed-off-by: Iain Sandoe fixincludes/ChangeLog: * fixincl.x:

[pushed] Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations [PR107586].

2023-01-21 Thread Iain Sandoe via Gcc-patches
tested on i688-darwin9, x86_64-darwin20,21 and x86_64-linux-gnu. pushed to trunk, thanks Iain --- 8< --- The SDK for MacOS13 includes Apple-specific deprecations of some functions that are not deprecated in Posix, C or C++ and widely used in GCC. The fix makes the deprecation conditional on

[PATCH] modula-2, testsuite: Make libs and interfaces consistent.

2023-01-17 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-linux-gnu (with a 32b multilib), powerpc, i686 and x86_64-darwin. OK for trunk? thanks, Iain --- 8< --- In some case the libraries list was being set before gm2_init_xxx was called. In some cases it was omitted - this could lead to a difference between the link libs and the

[PATCH] modula-2, driver, Front end: Revise handling of I and L paths [PR108182].

2023-01-17 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-linux-gnu (with a 32b multilib), powerpc, i686 and x86_64-darwin. OK for trunk? thanks, Iain --- 8< --- The adds the includes in the FE as done in other GCC languages. It also revises the library handling to avoid additional -L options from hiding LIBDIR. For the

[PATCH] modula-2: Fix stack size request in initPreemptive [PR108405]

2023-01-14 Thread Iain Sandoe via Gcc-patches
Given that, currently, this value is not configurable per target the short-term solution is to avoid a bad request. Tested on x86_64-darwin21, OK for trunk? thanks Iain --- 8< --- As noted in the PR, the problem is that we make a request for additional stack that violates the constraints on

[PATCH] modula-2: Handle pass '-v' option to the compiler.

2023-01-12 Thread Iain Sandoe via Gcc-patches
Tested on x86-64-darwin21. OK for trunk? Iain --- 8< --- Somehow this setting had been missed, and we really need the verbose flag to enable useful debug output. Signed-off-by: Iain Sandoe gcc/m2/ChangeLog: * gm2-gcc/m2options.h (M2Options_SetVerbose): Export the function.

[PATCH] modula-2, libm2min: Declare abort and exit as expected.

2023-01-07 Thread Iain Sandoe via Gcc-patches
Tested with a build on x86_64-darwin21, the build warnings are gone and the build completed as normal. OK for master? thanks Iain --- 8< --- The build is currently emitting a warning that abort() is declared differently from the built-in. This updates the declaration to match expectations.

[PATCH] modula-2, driver: Do not add extra '-L' options that shadow $libdir.

2023-01-07 Thread Iain Sandoe via Gcc-patches
tested on x86_64-linux-gnu, i686, powerpc, x86_64 darwin, note that this patch does expose PR108261 (but that is a separate issue). OK for trunk? thanks Iain --- 8< --- The driver is adding one '-L' option for each path to libm2xxx.a which is shadowing $libpath where the shared libraries are

[PATCH] modula-2: Remove uses of scalb*() and significand*() [PR107631]

2023-01-05 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin21 and x86_64-linux-gnu without any m2 regressions. OK for trunk? thanks Iain --- 8< --- The scalb*() functions are obsolete in Posix from 2004 and removed in 2008. The significand*() functions are glibc-only and considered there to be obsolescent (not supported for types

[PATCH] modula-2: Fix registration of modules via constructors [PR108183].

2023-01-02 Thread Iain Sandoe via Gcc-patches
When I first made this patch I had a question as to what should be done for registration CTORs generated by the compiler for .mod files. I've now answered that question (the code that makes the GCC decl has also be updated in a separately posted patch). tested on x86_64-linux-gnu, x86_64,

[PATCH] modula-2: Module registration constructors need to be visible [PR108259].

2023-01-02 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-linux-gnu, x86_64,aarch64-darwin21. There remain issues with shared libraries, but the link fails are fixed by this. OK for master? Thanks Iain --- 8< --- In the current design the main executable links explicitly to the module registration construtors that it uses. This means

[PATCH] modula-2, driver: Implement handling for -static-libgm2.

2023-01-02 Thread Iain Sandoe via Gcc-patches
tested on x86_64-linux-gnu, x86_64,aarch64-darwin21, OK for trunk? thanks, Iain --- 8< --- This was unimplemented so far. gcc/ChangeLog: * common.opt: Add -static-libgm2. * config/darwin.h (LINK_SPEC): Handle static-libgm2. gcc/m2/ChangeLog: * gm2spec.cc

[PATCH] configure: Do not build the unused libffi shared library.

2022-12-31 Thread Iain Sandoe via Gcc-patches
Tested on i686/powerpc/x86_64/aarch64 Darwin, x86_64-linux-gnu, OK for master? thanks Iain --- 8< --- We do not use the shared libffi library, nor do we install it. However, on at least Darwin, the shared version will be picked up for testing, so it is preferrable not to build it.

[PATCH] Modula-2, testsuite: No 96 bit floating type on Darwin.

2022-12-31 Thread Iain Sandoe via Gcc-patches
Tested on x86_64 and aarch64 Darwin, OK for master? thanks Iain --- 8< --- The realbitscast.mod is currently failing on x86_64 and aarch64 Darwin since they do not have a 96b floating type. Disable the type for all Darwin arches. gcc/testsuite/ChangeLog: *

[PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory.

2022-12-31 Thread Iain Sandoe via Gcc-patches
Tested on darwin21 with "make m2.pdf" and "make m2.dvi". OK for trunk? thanks. Iain --- 8< --- This also uses the configured $(TEXI2DVI) and $(TEXI2PDF) to deal with those targets (since we cannot assume to know what the user might have installed). gcc/m2/ChangeLog: * Make-lang.in

[PATCH 4/n] modula-2, driver: Handle static-libstd++ for targets without static/dynamic

2022-12-30 Thread Iain Sandoe via Gcc-patches
The follows the pattern used in C++ and D drivers to pass -static-libstdc++ onto the target driver to allow spec substitution of static libraries. NOTE: The general handling of Bstatic/dynamic and the possible use of static libgm2 libraries is unimplemented in this driver so far. It seems likely

[PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2022-12-30 Thread Iain Sandoe via Gcc-patches
This patch is providing functions used by the modula-2 implementation. At present, I've used a crt rather than adding symbols to libgcc, since it is not clear if the modula-2 might alter the use of scalb to scalbn (although that will not solve the missing significand* symbols). I plan to apply

[PATCH 3/n] modula2: Ensure that module registration constructors are 'extern' [PR108183].

2022-12-30 Thread Iain Sandoe via Gcc-patches
There are several modula-2 issues on Darwin, some blocking bootstrap on one or more system versions. This has been tested on powerpc/i688-darwin9 .. x86_64-darwin10,17,21 and the prototype aarch64-darwin branch on darwin21. OK for trunk? thanks Iain NOTE: As discussed in the PR, there are

[PATCH 2/n] modula-2, libgm2: Add undefined, dynamic_lookup to m2 libs links.

2022-12-30 Thread Iain Sandoe via Gcc-patches
There are several modula-2 issues on Darwin, some blocking bootstrap on one or more system versions. This has been tested on powerpc/i688-darwin9 .. x86_64-darwin10,17,21 and the prototype aarch64-darwin branch on darwin21. OK for trunk? thanks Iain P.S. I am slightly surprised that a target

[PATCH 1/n] modula-2: Fix building the plugin for Darwin [PR107612].

2022-12-30 Thread Iain Sandoe via Gcc-patches
From: Rainer Orth There are several modula-2 issues on Darwin, some blocking bootstrap on one or more system versions. This has been tested on powerpc/i688-darwin9 .. x86_64-darwin10,17,21 and the prototype aarch64-darwin branch on darwin21. OK for trunk? thanks Iain this patch: --- 8< ---

[ping^1] [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2022-12-30 Thread Iain Sandoe via Gcc-patches
it seems other targets are interested in this too - I was asked on IRC if it was going to be fixed this cycle. > On 7 Dec 2022, at 15:39, Iain Sandoe via Gcc-patches > wrote: > > This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. > The basic patch is live

[PATCH] Ada, Darwin: Do not link libgcc statically on Darwin [PR108202].

2022-12-24 Thread Iain Sandoe via Gcc-patches
Tested on i686, x86-64 darwin, x86_64-linux (with a 32b multilib). OK for trunk? Iain --- 8< --- Normally, GCC executables are built with -static-libstdc++ -static-libgcc on Darwin. This is fine in most cases, because GCC executables typically do not use exceptions. However gnat1 does use

[pushed] libgcc, Darwin: No early install for the compatibility libgcc_s.1.dylib.

2022-12-24 Thread Iain Sandoe via Gcc-patches
Tested on i686, x86_64 Darwin and x86_64-linux-gnu (with a 32b multilib). pushed to master, thanks Iain --- 8< --- On Darwin, GCC now uses a libgcc_s.1.1 for builtins and forwards the system unwinder. We do, however, build a backwards compatibility libgcc_s.1.dylib. However, this is not needed

[PATCH] libstdc++, testsuite: Correct an init.

2022-12-24 Thread Iain Sandoe via Gcc-patches
Noticed while debugging tz info support on Darwin, unless I miss some other reasoning... OK for trunk? Iain --- 8< --- in leap_seconds.cc, we are testing to see if the function that overrides the default zoneinfo directory has been called. That is implemented with a static boolean that needs to

[PATCH] libstdc++: Test for tzdata.zi before fallback version files.

2022-12-24 Thread Iain Sandoe via Gcc-patches
I tested this (along with the other posted patches for zoneinfo) using an installation built from the 2022g release on x86_64-darwin21. Wider testing will follow. If we are in an installation without the tzdata.zi then although we'll report the version OK, the available functionality will be

[PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.

2022-12-24 Thread Iain Sandoe via Gcc-patches
If this is not the right place to export the symbol (or you do not want to export it in the general case), I can always add a platform-specific file for it. So far, tested on x86_64-darwin21, wider testing will follow over the holidays. OK for trunk? Iain --- 8< --- This symbol needs

[PATCH] libstdc++, configure: Fix GLIBCXX_ZONEINFO_DIR configuration macro.

2022-12-23 Thread Iain Sandoe via Gcc-patches
This is a patch for comment on the approach - tested on x86_64-darwi21 thoughts? Iain --- 8< --- Testing on Darwin revealed that the GLIBCXX_ZONEINFO_DIR was not doing quite the right thing (we ended up with ${withval} in the config.h file). This patch proposes revising the behaviour of

[pushed] libffi: Fix X86 32b Darwin build and EH frames.

2022-12-21 Thread Iain Sandoe via Gcc-patches
The addition of rust has pulled in libffi as a target library for Darwin. This fails to bootstrap on some versions of i686-darwin and has build-time diagnostics on all. The EH is also invalid and those tests fail. Note that X86 Darwin is not listed as supported upstream. However I have made a

[PATCH] coroutines: Build pointer initializers with nullptr_node [PR107768]

2022-12-10 Thread Iain Sandoe via Gcc-patches
From: Andrew Pinski This is Andrew Pinski's patch, I just did testing, adjusted the test case and provided the Changelog. tested on x86-64-Darwin21, OK for trunk? Iain --- >8 --- The PR reports that using integer_zero_node triggers a warning for -Wzero-as-null-pointer-constant which comes from

[PATCH] coroutines: Accept 'extern "C"' coroutines.

2022-12-10 Thread Iain Sandoe via Gcc-patches
This came up in discussion and was relatively easy to 'fix' although it remains to be seen whether it was really intended. Tested on x86_64-darwin21. OK for trunk? Iain --- >8 --- As of now the standard does not appear to forbid this, and clang accepts. The use-cases are somewhat unclear

[PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2022-12-07 Thread Iain Sandoe via Gcc-patches
This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. The basic patch is live in the homebrew macOS support and so has had quite wide coverage on non-trivial codebases. OK for master? Iain Since this actually fixes wrong code, I wonder if we should also consider

[PATCH] c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.

2022-12-04 Thread Iain Sandoe via Gcc-patches
This fixes a long-standing problem on Darwin where we cannot independently set -static-libstdc++ because the flag gets stripped by the g++ driver. This patch is essentially the same as the one used for the 'D' driver and has been in local use for some time. It has also been tested on Linux. OK

[PATCH] testsuite, X86, Darwin: Fix bf16 ABI tests for Mach-O/macOS ABI.

2022-12-04 Thread Iain Sandoe via Gcc-patches
This is almost a completely Darwin-local patch, but there is one (repeated) place where a general change is needed - which is in making xmm_regs and x87_regs extern in the three copies of args.h (this is consistent with the other saved vars). These fails represent most of the current testsuite

[PATCH] libstdc++, Darwin: Limit recursive mutex init to OS versions needing it.

2022-12-04 Thread Iain Sandoe via Gcc-patches
While looking at Darwin's os_defines, I wondered whether _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC was really still necessary. On checking the OS, it seems that it was a transient problem that only appears in Darwin11. Earlier versions do not have the initializer, and the operation is fixed in

[pushed] libstdc++, Darwin: Fix weak attribute to use __weak__ instead of weak.

2022-12-04 Thread Iain Sandoe via Gcc-patches
As pointed out on irc by Jonathan, the Darwin os_defines contains a "weak" attribute where we should use '__weak__'. Fixed thus, tested on i686, x86_64 Darwin and x86_64 Linux, pushed to master, thanks, Iain -- >8 -- The text for _GLIBCXX_WEAK_DEFINITION has used 'weak' for the attribute name,

[pushed] libsanitizer, Darwin: Restrict build to Darwin 16 or newer.

2022-12-04 Thread Iain Sandoe via Gcc-patches
Tested on i686-darwin9, x86_64-darwin12, 21, and on x86_64-linux-gnu, pushed to master, thanks Iain -- >8 -- The latest import has added dependencies on system resources that are not present until Darwin 16. It might be possible to work around these for earlier systems, but in the short-term we

[PATCH] coroutines: Do not promote temporaries that will be elided.

2022-12-02 Thread Iain Sandoe via Gcc-patches
Thanks to Adrian for working on this and producing the revised test-cases. This has been tested on x86_64-darwin21 with our testsuite, cppcoro and a patched version of folly (that enables the experimental coroutines tests) without regresssion (actually a handful of progressions on folly, plus the

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-20 Thread Iain Sandoe via Gcc-patches
> On 20 Oct 2022, at 10:09, Hongtao Liu via Gcc-patches > wrote: > > On Thu, Oct 20, 2022 at 9:11 AM Hongtao Liu wrote: >> >> On Wed, Oct 19, 2022 at 7:09 PM Iain Sandoe wrote: >>> >>> Hi Hongtao >>> On 17 Oct 2022, at 02:56, Hongtao Liu wrote: On Mon, Oct 17, 2022 at

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-19 Thread Iain Sandoe via Gcc-patches
Hi Hongtao > On 17 Oct 2022, at 02:56, Hongtao Liu wrote: > > On Mon, Oct 17, 2022 at 9:30 AM Bernhard Reutner-Fischer > wrote: >> >> On 17 October 2022 03:02:22 CEST, Hongtao Liu via Gcc-patches >> >> Do you have this series as a branch somewhere that I can try on one of >> the

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
> On 14 Oct 2022, at 09:30, Hongtao Liu wrote: > > On Fri, Oct 14, 2022 at 4:24 PM Iain Sandoe wrote: >> >> >> >>> On 14 Oct 2022, at 09:20, Hongtao Liu wrote: >>> >>> On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches &

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
> On 14 Oct 2022, at 09:20, Hongtao Liu wrote: > > On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches > wrote: >> >> Hi Haochen >> >>> On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches >>> wrote: >>> >> >

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
Hi Haochen > On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches > wrote: > > These six patches aimed to add Intel Sierra Forest instructions, including > AVX-IFMA, AVX-VNNI0INT8, AVX-NE-CONVERT, CMPccXADD. We also added intrinsic > for vector __bf16 in this series of patch and Sierra

[PATCH] coroutines: Use cp_build_init_expr consistently.

2022-10-11 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-darwin19, OK for master? thanks Iain -- >8 -- Now we have the TARGET_EXPR_ELIDING_P flag, it is important to ensure it is set properly on target exprs. The code here has a mixture of APIs used to build inits. This patch changes that to use cp_build_init_expr() where possible,

Re: [PATCH] Avoid depending on destructor order

2022-09-26 Thread Iain Sandoe via Gcc-patches
> On 26 Sep 2022, at 12:49, Thomas Neumann via Gcc-patches > wrote: > > Hi Claudiu, > >> This change prohibits compiling of ARC backend: >>> + gcc_assert (in_shutdown || ob); >> in_shutdown is only defined when ATOMIC_FDE_FAST_PATH is defined, >> while gcc_assert is outside of any ifdef.

Re: Make 'autoreconf' work for 'gcc', 'libobjc' (was: [PATCH] regenerate configure files and config.h.in files)

2022-09-20 Thread Iain Sandoe via Gcc-patches
Hi! > On 20 Sep 2022, at 14:37, Thomas Schwinge wrote: > On 2022-08-25T11:42:01+0200, Martin Liška wrote: >> I wrote a scipt that runs autoconf in all folders that have configure.ac >> file and same for autoheader (where AC_CONFIG_HEADERS is present) and >> this is the output. >> >> The

Re: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-13 Thread Iain Sandoe via Gcc-patches
Hi > On 13 Sep 2022, at 03:34, HAO CHEN GUI via Gcc-patches > wrote: > On 7/9/2022 上午 1:19, Segher Boessenkool wrote: >> make -k -j60 check >> RUNTESTFLAGS="--target_board=unix'{-m64,-m32,-m32/-mpowerpc64}'" >> >> It is fine to not test -m32/-mpowerpc64 so often, and certaionly not >>

Re: Patch ping (was Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange)

2022-09-09 Thread Iain Sandoe via Gcc-patches
> On 9 Sep 2022, at 19:36, Rainer Orth wrote: > >> Here's a complete patch that combines the various incremental patches >> that have been going around. I'm testing this now. >> >> Please take a look. > > unfortunately, this patch broke macOS bootstrap (seen on >

Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry

2022-08-01 Thread Iain Sandoe via Gcc-patches
> On 1 Aug 2022, at 09:21, Richard Biener via Gcc-patches > wrote: > > On Sun, 31 Jul 2022, Iain Sandoe wrote: > >> Hi Richi, >> >>> On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches >>> wrote: >>> >>> The following makes the backward threader reject threads whose entry >>> edge

Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry

2022-07-31 Thread Iain Sandoe via Gcc-patches
Hi Richi, > On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches > wrote: > > The following makes the backward threader reject threads whose entry > edge is probably never executed according to the profile. That in > particular, for the testcase, avoids threading the irq == 1 check > on

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-07-25 Thread Iain Sandoe via Gcc-patches
Hi Sebastian, > On 25 Jul 2022, at 06:59, Sebastian Huber > wrote: > On 22/07/2022 16:02, Jose E. Marchesi wrote: >> I find "subtarget" confusing in this context. >> If it is about rtems.h, linux.h or sol2.h, wouldn't this be better >> called OS_CC1_SPEC or similar? These files specify

Re: [PING][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-07-12 Thread Iain Sandoe via Gcc-patches
Hi Tom > On 12 Jul 2022, at 14:42, Tom de Vries via Gcc-patches > wrote: > > [ dropped gdb-patches, since already applied there. ] > > On 6/27/22 15:38, Tom de Vries wrote: >> On 6/27/22 15:03, Tom de Vries wrote: >>> Hi, >>> >>> When building gdb with --enabled-shared, I run into: >>> ...

[PATCH] configure: When host-shared, pass --with-pic to in-tree lib configs.

2022-06-26 Thread Iain Sandoe via Gcc-patches
If we are building PIC/PIE host executables, and we are building dependent libs (e.g. GMP) in-tree those libs need to be configured to generate PIC code. At present, if an --enable-host-shared build is attempted on ELF platforms, with in-tree dependents, the build will fail with incompatible

[pushed] configure, Darwin: Correct a pasto in host-shared processing.

2022-06-26 Thread Iain Sandoe via Gcc-patches
We do, of course, mean $host not $target in this case. Corrected thus. tested on x86_64-darwin and x86_64-linux, pushed to master, thanks Iain Signed-off-by: Iain Sandoe ChangeLog: * configure: Regenerate. * configure.ac: Correct use of $host. --- configure| 4 ++--

[PATCH] testsuite, Darwin: Fix darwin-comm-1.c error messages for Darwin <= 10.

2022-06-25 Thread Iain Sandoe via Gcc-patches
When amending the allowed alignment size to accommodate the larger values permitted by newer tools, we retained the object file limit of 2^15 for Darwin versions <= 10, since that is what the native tools expect there. This triggers a different diagnostic path with a distinct error message, which

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

2022-06-24 Thread Iain Sandoe via Gcc-patches
> On 24 Jun 2022, at 17:09, Joseph Myers wrote: > > On Fri, 24 Jun 2022, Andrew Pinski via Gcc-patches wrote: > >> Though I do find that -E/-F have been part of the POSIX standard since >> at least 2004 which is interesting. > > grep -E and -F are already defined, and egrep and fgrep marked

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-22 Thread Iain Sandoe via Gcc-patches
> On 22 Jun 2022, at 01:36, Alexandre Oliva via Gcc-patches > wrote: > > On Jun 21, 2022, Fangrui Song wrote: > >> Is this similar to clang -nostdlib++ ? >> When libstdc++ is selected, clang -nostdlib++ removes -lstdc++. > > Sounds like they're the same indeed, but the clang option you

[PATCH] testsuite, asan: Avoid color in asan test output.

2022-06-20 Thread Iain Sandoe via Gcc-patches
The presence of the color markers in the some of the asan tests appears to confuse the dg-output matching (possibly a platform TCL or termios bug) on some Darwin platforms. Since the color is not being tested, switch it off (makes the log files easier to read too). This fixes a large number of

[pushed] testsuite, Darwin: Skip an unsupported test.

2022-06-20 Thread Iain Sandoe via Gcc-patches
Darwin does not support patchable function entries, skip the test there. tested on x86_64 darwin / linux, pushed to master, thanks, Iain gcc/testsuite/ChangeLog: * g++.dg/modules/pr105169_a.C: Skip the test on Darwin. * g++.dg/modules/pr105169_b.C: Likewise. ---

[pushed] testsuite, Darwin: Allow for two CTOR bodies in array61 test.

2022-06-20 Thread Iain Sandoe via Gcc-patches
For targets without alias support, we emit two essentially identical function bodies into the gimple (complete and base CTORs). So this test needs to allow for that when the target does not support aliases. The target support alias test does not seem to be usable in the context of a single

[pushed] testsuite: Add a missing USER_LABEL_PREFIX to a regex.

2022-06-20 Thread Iain Sandoe via Gcc-patches
Fixes this test on Darwin. tested on x86_64 darwin / linux, pushed to master, thanks Iain Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * g++.dg/modules/init-2_b.C: Add a missing USER_LABEL_PREFIX to a regex. --- gcc/testsuite/g++.dg/modules/init-2_b.C | 2 +- 1 file

[pushed] testsuite: Require init_priority target support in a test.

2022-06-20 Thread Iain Sandoe via Gcc-patches
The attr-cdtor-1 test fails on targets without init priority since the diagnostic emitted concerns the absence of support. Disable the test on such targets. tested on x86_64 darwin / linux, pushed to master, thanks Iain Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: *

[pushed] Darwin: Fix empty g++ command lines [PR105599].

2022-05-29 Thread Iain Sandoe via Gcc-patches
An empty g++ command line should produce a diagnostic that there are no inputs. The PR is that currently Darwin produces a dignostic about missing link items instead - this is because (errnoeously), for this driver, we are creating a link job for empty command lines. The problem occurs in four

  1   2   3   >