public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>, newlib@sourceware.org
Subject: Re: Various libgloss problems after recent changes
Date: Thu, 9 Feb 2023 17:54:33 -0500	[thread overview]
Message-ID: <CAOox84ta5H_s22y=yGRHy727FpwjFrVPj-Zy-V0fyTxqKRtSkQ@mail.gmail.com> (raw)
In-Reply-To: <bde22afa-8a62-c843-2d27-0e711b0effcd@gmail.com>


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

Hi Jeff,

Want to try out the attached patch?

-- Jeff J.


On Sun, Feb 5, 2023 at 7:48 PM Jeff Law <jeffreyalaw@gmail.com> wrote:

> The fr30-elf and xstormy16-elf ports have been failing to build for
> about a month with this error:
>
>   > fr30-elf-as  -I. -I../../../../..//newlib-cygwin/libgloss/fr30/..
> -I./.. -idirafter
> ../../../../..//newlib-cygwin/libgloss/fr30/../../include  -o crt0.o
> ../../../../..//newlib-cygwin/libgloss/fr30/crt0.s
> > fr30-elf-as: unrecognized option '-idirafter'
>
>
> For a full log:
>
> http://law-sandy.freeddns.org:8080/job/fr30-elf/1984/console
>
> Hopefully this is easy to fix so we can get those ports under regular
> testing again.
>
> Jeff
>
>

[-- Attachment #2: 0001-Fix-libgloss-build-for-fr30-and-xstormy16.patch --]
[-- Type: text/x-patch, Size: 4083 bytes --]

From 29211fd70d0e8ad6660e2b552323747bc28e2941 Mon Sep 17 00:00:00 2001
From: Jeff Johnston <jjohnstn@redhat.com>
Date: Thu, 9 Feb 2023 16:59:31 -0500
Subject: [PATCH] Fix libgloss build for fr30 and xstormy16

- conditionally don't use -idirafter option
---
 libgloss/Makefile.am  |  4 ++++
 libgloss/Makefile.in  |  3 ++-
 libgloss/configure    | 17 +++++++++++++++++
 libgloss/configure.ac |  5 +++++
 4 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 4309cd3..92d91bf 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -24,7 +24,11 @@ includetool_DATA =
 includesystooldir = $(tooldir)/include/sys
 includesystool_DATA =
 
+if HAVE_IDIRAFTER
 AM_CPPFLAGS = -idirafter $(srcroot)/include
+else
+AM_CPPFLAGS =
+endif
 
 # A fake library so automake will generate rules for plain objects that we want
 # to install (e.g. our crt0.o objects).
diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in
index a117577..ebbf28c 100644
--- a/libgloss/Makefile.in
+++ b/libgloss/Makefile.in
@@ -807,7 +807,8 @@ includetooldir = $(tooldir)/include
 includetool_DATA = $(am__append_16)
 includesystooldir = $(tooldir)/include/sys
 includesystool_DATA = $(am__append_17)
-AM_CPPFLAGS = -idirafter $(srcroot)/include
+@HAVE_IDIRAFTER_FALSE@AM_CPPFLAGS = 
+@HAVE_IDIRAFTER_TRUE@AM_CPPFLAGS = -idirafter $(srcroot)/include
 
 # A fake library so automake will generate rules for plain objects that we want
 # to install (e.g. our crt0.o objects).
diff --git a/libgloss/configure b/libgloss/configure
index 28754b6..a188a79 100755
--- a/libgloss/configure
+++ b/libgloss/configure
@@ -630,6 +630,8 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+HAVE_IDIRAFTER_FALSE
+HAVE_IDIRAFTER_TRUE
 CONFIG_WINCE_FALSE
 CONFIG_WINCE_TRUE
 CONFIG_RISCV_FALSE
@@ -2865,6 +2867,7 @@ case "${target}" in
 	ac_config_files="$ac_config_files fr30/Makefile"
 
 	subdirs="$subdirs fr30"
+	config_fr30=true
 	;;
   frv*-*-*)
 	ac_config_files="$ac_config_files frv/Makefile"
@@ -2925,6 +2928,7 @@ case "${target}" in
 	ac_config_files="$ac_config_files xstormy16/Makefile"
 
 	subdirs="$subdirs xstormy16"
+	config_xstormy16=true
 	;;
   m32c-*-*)
 	ac_config_files="$ac_config_files m32c/Makefile"
@@ -3081,6 +3085,15 @@ fi
 
 
 
+ if test x$config_fr30 = x && test x$config_xstormy16 = x; then
+  HAVE_IDIRAFTER_TRUE=
+  HAVE_IDIRAFTER_FALSE='#'
+else
+  HAVE_IDIRAFTER_TRUE='#'
+  HAVE_IDIRAFTER_FALSE=
+fi
+
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -5347,6 +5360,10 @@ if test -z "${CONFIG_WINCE_TRUE}" && test -z "${CONFIG_WINCE_FALSE}"; then
   as_fn_error $? "conditional \"CONFIG_WINCE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_IDIRAFTER_TRUE}" && test -z "${HAVE_IDIRAFTER_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_IDIRAFTER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 5fb2684..4528b09 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -145,6 +145,7 @@ case "${target}" in
   fr30-*-*)
 	AC_CONFIG_FILES([fr30/Makefile])
 	subdirs="$subdirs fr30"
+	config_fr30=true
 	;;
   frv*-*-*)
 	AC_CONFIG_FILES([frv/Makefile])
@@ -194,6 +195,7 @@ case "${target}" in
   xstormy16-*-*)
 	AC_CONFIG_FILES([xstormy16/Makefile])
 	subdirs="$subdirs xstormy16"
+	config_xstormy16=true
 	;;
   m32c-*-*)
 	AC_CONFIG_FILES([m32c/Makefile])
@@ -252,6 +254,9 @@ m4_foreach_w([SUBDIR], [
   AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR = xtrue)
 ])
 
+dnl fr30 and xstormy16 compilers don't support -idirafter
+AM_CONDITIONAL([HAVE_IDIRAFTER], [[test x$config_fr30] = x] && [[test x$config_xstormy16] = x])
+
 dnl For now, don't bother configuring testsuite
 dnl
 dnl if test "${config_testsuite}" = "true";
-- 
1.8.3.1


  reply	other threads:[~2023-02-09 22:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06  0:48 Jeff Law
2023-02-09 22:54 ` Jeff Johnston [this message]
2023-02-10 11:21   ` Richard Earnshaw
2023-02-10 16:54     ` Jeff Law
2023-02-21 21:39       ` Jeff Johnston
2023-02-22  7:16         ` Jeff Law
2023-02-22 16:20           ` Jeff Johnston
2023-02-22 16:40             ` Jeff Law
2023-02-22 17:54             ` Jeff Law
2023-02-22 18:06               ` Jeff Johnston
2023-02-10 17:16     ` Jeff Johnston
2023-12-04  6:49     ` Mike Frysinger
2023-02-10 16:52   ` Jeff Law
2023-12-04  7:03 ` [PATCH 1/2] Revert "Fix libgloss/newlib build to conditionally use top include dir" Mike Frysinger
2023-12-04  7:03   ` [PATCH 2/2] libgloss: drop $(INCLUDES) when using $(AS) Mike Frysinger

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='CAOox84ta5H_s22y=yGRHy727FpwjFrVPj-Zy-V0fyTxqKRtSkQ@mail.gmail.com' \
    --to=jjohnstn@redhat.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=newlib@sourceware.org \
    --cc=vapier@gentoo.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).