Re: Where `gcc -MMD' puts .d files - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Where `gcc -MMD' puts .d files
Date
Msg-id Pine.LNX.4.30.0105081841010.759-100000@peter.localdomain
Whole thread Raw
In response to Re: Where `gcc -MMD' puts .d files  (Alexander Klimov <ask@wisdom.weizmann.ac.il>)
List pgsql-hackers
Alexander Klimov writes:

> The point is that I do use gcc 2.95.2, and it puts .d file in the curent
> directory, not to the directory there files come from. Anyway, my patch
> solve the problem at least for me.

I see the problem, the port/Makefile needs some changes because it's
trying to put output files outside the current directory.  Try this patch:

diff -c -r1.28 Makefile.in
*** Makefile.in 2000/12/11 00:49:54     1.28
--- Makefile.in 2001/05/08 16:42:20
***************
*** 22,29 **** include $(top_builddir)/src/Makefile.global
 OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
! OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@ OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@ ifeq
($(PORTNAME),qnx4) OBJS += getrusage.o qnx4/SUBSYS.o endif
 
--- 22,32 ---- include $(top_builddir)/src/Makefile.global
 OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
! OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @TAS@ @ISINF@ OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@
+ ifdef STRDUP
+ OBJS += $(top_builddir)/src/utils/strdup.o
+ endif ifeq ($(PORTNAME), qnx4) OBJS += getrusage.o qnx4/SUBSYS.o endif
***************
*** 56,61 ****
--- 59,68 ----
 tas.o: tas.s       $(CC) $(CFLAGS) -c $<
+
+ $(top_builddir)/src/utils/strdup.o:
+       $(MAKE) -C $(top_builddir)/src/utils strdup.o
+
 distclean clean:       rm -f SUBSYS.o $(OBJS)
===snip

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Is `#!/bin/sh' configurable?
Next
From: Barry Lind
Date:
Subject: Re: AW: Isn't pg_statistic a security hole?