From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: gdb-patches <gdb-patches@sourceware.org>, Bobo <spiridenok@tut.by>
Subject: [patch/libdecnumber] Fix to compile with Solaris make
Date: Wed, 07 Nov 2007 20:20:00 -0000 [thread overview]
Message-ID: <1194466816.6746.41.camel@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
Hi folks,
My previous patch to the libdecnumber build system enabled libdecnumber
to be built by native make on *BSD, but Solaris' make still doens't
work.
The problem is that in that version of make, the $< automatic variable
is not set for targets that have an explicit compilation rule instead of
using the .c.o default rule.
This patch substitutes the $< variable for the explicit name of the
source file which should be compiled in those targets that define a
compilation rule.
It also prepends $(srcdir) to the path of files that reside in a
subdirectory of the libdecnumber source tree, for completeness.
I tested by compiling libdecnumber on Solaris, Linux and OpenBSD.
Is this ok?
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
[-- Attachment #2: fix-solaris-build.diff --]
[-- Type: text/x-patch, Size: 3000 bytes --]
2007-11-07 Thiago Jung Bauermann <bauerman@br.ibm.com>
* Makefile.in (decimal32.o): Prepend $(srcdir) to dependencies
and substitute $< for the source file in compilation command.
(decimal64.o): Likewise.
(decimal128.o): Likewise.
(bid2dpd_dpd2bid.o): Likewise.
(host-ieee32.o): Likewise.
(host-ieee64.o): Likewise.
(host-ieee128.o): Likewise.
Index: libdecnumber/Makefile.in
===================================================================
--- libdecnumber.orig/Makefile.in 2007-11-07 15:40:51.000000000 -0200
+++ libdecnumber/Makefile.in 2007-11-07 15:55:17.000000000 -0200
@@ -115,30 +115,30 @@ decContext.o: decContext.c decContext.h
decContextSymbols.h
decNumber.o: decNumber.c decNumber.h decContext.h decNumberLocal.h \
decNumberSymbols.h
-decimal32.o: $(enable_decimal_float)/decimal32.c \
- $(enable_decimal_float)/decimal32.h \
- $(enable_decimal_float)/decimal32Symbols.h \
+decimal32.o: $(srcdir)/$(enable_decimal_float)/decimal32.c \
+ $(srcdir)/$(enable_decimal_float)/decimal32.h \
+ $(srcdir)/$(enable_decimal_float)/decimal32Symbols.h \
decNumber.h decContext.h decNumberLocal.h
- $(COMPILE) $<
-decimal64.o: $(enable_decimal_float)/decimal64.c \
- $(enable_decimal_float)/decimal64.h \
- $(enable_decimal_float)/decimal64Symbols.h \
+ $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal32.c
+decimal64.o: $(srcdir)/$(enable_decimal_float)/decimal64.c \
+ $(srcdir)/$(enable_decimal_float)/decimal64.h \
+ $(srcdir)/$(enable_decimal_float)/decimal64Symbols.h \
decNumber.h decContext.h decNumberLocal.h
- $(COMPILE) $<
-decimal128.o: $(enable_decimal_float)/decimal128.c \
- $(enable_decimal_float)/decimal128.h \
- $(enable_decimal_float)/decimal128Symbols.h\
- $(enable_decimal_float)/decimal128Local.h\
+ $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal64.c
+decimal128.o: $(srcdir)/$(enable_decimal_float)/decimal128.c \
+ $(srcdir)/$(enable_decimal_float)/decimal128.h \
+ $(srcdir)/$(enable_decimal_float)/decimal128Symbols.h\
+ $(srcdir)/$(enable_decimal_float)/decimal128Local.h\
decNumber.h decContext.h decNumberLocal.h
- $(COMPILE) $<
-bid2dpd_dpd2bid.o : bid/bid2dpd_dpd2bid.c bid/bid2dpd_dpd2bid.h
- $(COMPILE) $<
-host-ieee32.o : bid/host-ieee32.c bid/decimal32.h
- $(COMPILE) $<
-host-ieee64.o : bid/host-ieee64.c bid/decimal64.h
- $(COMPILE) $<
-host-ieee128.o : bid/host-ieee128.c bid/decimal128.h
- $(COMPILE) $<
+ $(COMPILE) $(srcdir)/$(enable_decimal_float)/decimal128.c
+bid2dpd_dpd2bid.o : $(srcdir)/bid/bid2dpd_dpd2bid.c $(srcdir)/bid/bid2dpd_dpd2bid.h
+ $(COMPILE) $(srcdir)/bid/bid2dpd_dpd2bid.c
+host-ieee32.o : $(srcdir)/bid/host-ieee32.c $(srcdir)/bid/decimal32.h
+ $(COMPILE) $(srcdir)/bid/host-ieee32.c
+host-ieee64.o : $(srcdir)/bid/host-ieee64.c $(srcdir)/bid/decimal64.h
+ $(COMPILE) $(srcdir)/bid/host-ieee64.c
+host-ieee128.o : $(srcdir)/bid/host-ieee128.c $(srcdir)/bid/decimal128.h
+ $(COMPILE) $(srcdir)/bid/host-ieee128.c
# Other miscellaneous targets.
mostlyclean:
next reply other threads:[~2007-11-07 20:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 20:20 Thiago Jung Bauermann [this message]
2007-11-09 0:06 ` Ben Elliston
[not found] ` <20071126181443.GA18608@vervain.rchland.ibm.com>
2007-12-04 20:04 ` Thiago Jung Bauermann
2007-12-05 0:34 ` Ben Elliston
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=1194466816.6746.41.camel@localhost.localdomain \
--to=bauerman@br.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=spiridenok@tut.by \
/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