[PATCH 1/8] libgloss: i386: simplify target flags

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Collapse these 3 settings into one variable to make it eaiser to
merge into the top-level.
---
 libgloss/i386/Makefile.in  |  4 ++--
 libgloss/i386/configure    | 13 +++++--------
 libgloss/i386/configure.ac |  9 ++++-----
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/libgloss/i386/Makefile.in b/libgloss/i386/Makefile.in
index 5764d44b122d..4fabce42aefc 100644
--- a/libgloss/i386/Makefile.in
+++ b/libgloss/i386/Makefile.in
@@ -90,10 +90,10 @@ libcygmon.a: $(CYGMON_OBJS)
 	${RANLIB} $@
 
 cygmon-salib.o: ${srcdir}/cygmon-salib.c
-	$(CC) -c $(CFLAGS) @NEED_UNDERSCORE@ @IS_COFF@ @IS_AOUT@ $(<) -o $@
+	$(CC) -c $(CFLAGS) $(I386_CPPFLAGS) $(<) -o $@
 
 cygmon-crt0.o: ${srcdir}/cygmon-crt0.S
-	$(CC) -c $(CFLAGS) @NEED_UNDERSCORE@ @IS_COFF@ @IS_AOUT@ $(<) -o $@
+	$(CC) -c $(CFLAGS) $(I386_CPPFLAGS) $(<) -o $@
 
 doc:	
 
diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac
index e03620770235..ac1518648146 100644
--- a/libgloss/i386/configure.ac
+++ b/libgloss/i386/configure.ac
@@ -21,14 +21,16 @@ AC_ARG_PROGRAM
 
 AC_PROG_INSTALL
 
+I386_CPPFLAGS=
 case "$target" in
     *coff)
-	IS_COFF="-DCOFF"
+	I386_CPPFLAGS="-DCOFF"
 	;;
     *aout)
-	IS_AOUT="-DAOUT"
+	I386_CPPFLAGS="-DAOUT"
 	;;
 esac
+AC_SUBST(I386_CPPFLAGS)
 
 LIB_AC_PROG_CC
 AS=${AS-as}
@@ -37,9 +39,6 @@ AR=${AR-ar}
 AC_SUBST(AR)
 LD=${LD-ld}
 AC_SUBST(LD)
-AC_SUBST(IS_COFF)
-AC_SUBST(IS_AOUT)
-AC_SUBST(NEED_UNDERSCORE)
 AC_PROG_RANLIB
 LIB_AM_PROG_AS
 
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.