public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Costas Argyris <costas.argyris@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Jonathan Yong <10walls@gmail.com>
Subject: [PATCH] Fix native MSYS2 build failure [PR108865, PR109188]
Date: Thu, 23 Mar 2023 21:54:41 +0000	[thread overview]
Message-ID: <CAHyHGCnjyyd7WQ13VcW6_Hx_qxjE=cjxyLOxVv504=exgThb1w@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 196 bytes --]

Patch to fix native Windows MSYS2 package build failures.

The patch has been confirmed by both original reporters in the
PRs, and myself.

cc'd mingw-w64 maintainer for mingw-w64-specific issue.

[-- Attachment #2: 0001-Fix-native-MSYS2-build-failure-PR108865-PR109188.patch --]
[-- Type: application/octet-stream, Size: 1340 bytes --]

From 9eca6b2265c408d89857491176697fe458955bd8 Mon Sep 17 00:00:00 2001
From: Costas Argyris <costas.argyris@gmail.com>
Date: Wed, 22 Mar 2023 10:28:08 +0000
Subject: [PATCH] Fix native MSYS2 build failure [PR108865, PR109188]

Don't cause an error if the symbol is not found.

When building natively as an MSYS2 package, some
executables are borrowing the $(COMPILERS) flags
and --require-defined=HOST_EXTRA_OBJS_SYMBOL is
causing them to fail.

These executables don't need that symbol, so make
it optional such that they don't error out.

The compilers will still look for it (and find it)
with the desired effect of getting UTF-8 support.
---
 gcc/config/i386/x-mingw32-utf8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/x-mingw32-utf8 b/gcc/config/i386/x-mingw32-utf8
index 6161dc23547..9de963d7965 100644
--- a/gcc/config/i386/x-mingw32-utf8
+++ b/gcc/config/i386/x-mingw32-utf8
@@ -53,4 +53,4 @@ utf8-mingw32.o : utf8rc-mingw32.o sym-mingw32.o
 # This is expected because the resource object is not supposed
 # to have any symbols, it just has to be linked into the
 # executable in order for Windows to use the utf8 code page.
-$(COMPILERS) : override LDFLAGS += -Wl,--require-defined=HOST_EXTRA_OBJS_SYMBOL
+$(COMPILERS) : override LDFLAGS += -Wl,--undefined=HOST_EXTRA_OBJS_SYMBOL
-- 
2.30.2


                 reply	other threads:[~2023-03-23 21:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyHGCnjyyd7WQ13VcW6_Hx_qxjE=cjxyLOxVv504=exgThb1w@mail.gmail.com' \
    --to=costas.argyris@gmail.com \
    --cc=10walls@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).