public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fixes for make clean
@ 2005-01-03 11:11 Andreas Jaeger
  2005-01-03 16:57 ` Ulrich Drepper
  2005-01-07 12:44 ` Jakub Jelinek
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Jaeger @ 2005-01-03 11:11 UTC (permalink / raw)
  To: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 2516 bytes --]


After make clean I see the following files in my build-dir, the
appended patch takes care of deleting them:

./elf:
total 20
-rwxr-xr-x  1 aj users 12949 2005-01-02 10:38 tst-pie1
-rw-r--r--  1 aj users  3000 2004-09-29 21:21 tst-pie1.o
-rw-r--r--  1 aj users     0 2005-01-02 10:38 tst-pie1.out

./csu:
total 4
-rw-r--r--  1 aj users 2384 2005-01-02 09:31 start.os

Ok to commit?

Andreas

2005-01-03  Andreas Jaeger  <aj@suse.de>

	* csu/Makefile (generated): Add start.os and start.ob.

	* elf/Makefile (tests): Change rule for tst-pie1 so that make
	clean works.

============================================================
Index: csu/Makefile
--- csu/Makefile	20 Aug 2004 20:12:43 -0000	1.74
+++ csu/Makefile	3 Jan 2005 11:10:36 -0000
@@ -1,5 +1,5 @@
 # Makefile for csu code for GNU C library.
-# Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -54,11 +54,13 @@ include ../Makeconfig
 ifeq (yes,$(build-shared))
 extra-objs += S$(start-installed-name)
 install-lib += S$(start-installed-name)
+generated += start.os
 endif
 
 ifeq (yes,$(build-bounded))
 extra-objs += b$(start-installed-name)
 install-lib += b$(start-installed-name)
+generated += start.ob
 endif
 
 ifneq ($(start-installed-name),$(static-start-installed-name))
============================================================
Index: elf/Makefile
--- elf/Makefile	27 Oct 2004 20:26:47 -0000	1.287
+++ elf/Makefile	3 Jan 2005 11:10:36 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -163,7 +163,7 @@ tests-nodlopen-yes = nodlopen nodlopen2
 tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
 endif
 ifeq (yesyes,$(have-fpie)$(build-shared))
-tests: $(objpfx)tst-pie1.out
+tests += tst-pie1
 endif
 modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
 		testobj1_1 failobj constload2 constload3 unloadmod \

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fixes for make clean
  2005-01-03 11:11 Fixes for make clean Andreas Jaeger
@ 2005-01-03 16:57 ` Ulrich Drepper
  2005-01-07 12:44 ` Jakub Jelinek
  1 sibling, 0 replies; 8+ messages in thread
From: Ulrich Drepper @ 2005-01-03 16:57 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

Andreas Jaeger wrote:

> Ok to commit?

Yes.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fixes for make clean
  2005-01-03 11:11 Fixes for make clean Andreas Jaeger
  2005-01-03 16:57 ` Ulrich Drepper
@ 2005-01-07 12:44 ` Jakub Jelinek
  2005-01-07 13:58   ` Andreas Jaeger
  1 sibling, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2005-01-07 12:44 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Glibc hackers

On Mon, Jan 03, 2005 at 12:10:58PM +0100, Andreas Jaeger wrote:
> 2005-01-03  Andreas Jaeger  <aj@suse.de>
> 
> 	* elf/Makefile (tests): Change rule for tst-pie1 so that make
> 	clean works.
> 
> --- elf/Makefile	27 Oct 2004 20:26:47 -0000	1.287
> +++ elf/Makefile	3 Jan 2005 11:10:36 -0000
> @@ -1,4 +1,4 @@
> -# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
> +# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
>  # This file is part of the GNU C Library.
>  
>  # The GNU C Library is free software; you can redistribute it and/or
> @@ -163,7 +163,7 @@ tests-nodlopen-yes = nodlopen nodlopen2
>  tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
>  endif
>  ifeq (yesyes,$(have-fpie)$(build-shared))
> -tests: $(objpfx)tst-pie1.out
> +tests += tst-pie1
>  endif
>  modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
>  		testobj1_1 failobj constload2 constload3 unloadmod \

This change is bad:
make[2]: Entering directory
`/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/elf' Makefile:726: warning: overriding commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
../Rules:118: warning: ignoring old commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
mkdir /usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf

I think putting tst-pie1.out and tst-pie1 into generated instead would cure
this.

	Jakub

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fixes for make clean
  2005-01-07 12:44 ` Jakub Jelinek
@ 2005-01-07 13:58   ` Andreas Jaeger
  2005-01-08 16:39     ` [PATCH] Fixes for make clean (take 2) Jakub Jelinek
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 2005-01-07 13:58 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

Jakub Jelinek <jakub@redhat.com> writes:

> On Mon, Jan 03, 2005 at 12:10:58PM +0100, Andreas Jaeger wrote:
>> 2005-01-03  Andreas Jaeger  <aj@suse.de>
>> 
>> 	* elf/Makefile (tests): Change rule for tst-pie1 so that make
>> 	clean works.
>> 
>> --- elf/Makefile	27 Oct 2004 20:26:47 -0000	1.287
>> +++ elf/Makefile	3 Jan 2005 11:10:36 -0000
>> @@ -1,4 +1,4 @@
>> -# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
>> +# Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
>>  # This file is part of the GNU C Library.
>>  
>>  # The GNU C Library is free software; you can redistribute it and/or
>> @@ -163,7 +163,7 @@ tests-nodlopen-yes = nodlopen nodlopen2
>>  tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
>>  endif
>>  ifeq (yesyes,$(have-fpie)$(build-shared))
>> -tests: $(objpfx)tst-pie1.out
>> +tests += tst-pie1
>>  endif
>>  modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
>>  		testobj1_1 failobj constload2 constload3 unloadmod \
>
> This change is bad:
> make[2]: Entering directory
> `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/elf' Makefile:726: warning: overriding commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
> ../Rules:118: warning: ignoring old commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
> mkdir /usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf
>
> I think putting tst-pie1.out and tst-pie1 into generated instead would cure
> this.

I'll revert my patch now,

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fixes for make clean (take 2)
  2005-01-07 13:58   ` Andreas Jaeger
@ 2005-01-08 16:39     ` Jakub Jelinek
  2005-01-08 16:49       ` Andreas Jaeger
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2005-01-08 16:39 UTC (permalink / raw)
  To: Ulrich Drepper, Andreas Jaeger; +Cc: Glibc hackers

On Fri, Jan 07, 2005 at 02:58:21PM +0100, Andreas Jaeger wrote:
> > This change is bad:
> > make[2]: Entering directory
> > `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/elf' Makefile:726: warning: overriding commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
> > ../Rules:118: warning: ignoring old commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
> > mkdir /usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf
> >
> > I think putting tst-pie1.out and tst-pie1 into generated instead would cure
> > this.
> 
> I'll revert my patch now,

This seems to work for me:

2005-01-08  Jakub Jelinek  <jakub@redhat.com>

	* elf/Makefile (generated): Add tst-pie1{,.out,.o}.

--- libc/elf/Makefile.jj	2005-01-08 16:50:21.000000000 +0100
+++ libc/elf/Makefile	2005-01-08 17:24:04.000000000 +0100
@@ -734,6 +734,8 @@ $(objpfx)tst-pie1: $(objpfx)tst-pie1.o $
 	  -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
 	  -o $@ $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so \
 	  $(common-objpfx)libc_nonshared.a
+
+generated += tst-pie1 tst-pie1.out tst-pie1.o
 endif
 
 check-textrel-CFLAGS = -O -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE


	Jakub

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fixes for make clean (take 2)
  2005-01-08 16:39     ` [PATCH] Fixes for make clean (take 2) Jakub Jelinek
@ 2005-01-08 16:49       ` Andreas Jaeger
  2005-01-08 17:04         ` Jakub Jelinek
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 2005-01-08 16:49 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 1137 bytes --]

Jakub Jelinek <jakub@redhat.com> writes:

> On Fri, Jan 07, 2005 at 02:58:21PM +0100, Andreas Jaeger wrote:
>> > This change is bad:
>> > make[2]: Entering directory
>> > `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/elf' Makefile:726: warning: overriding commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
>> > ../Rules:118: warning: ignoring old commands for target `/usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf/tst-pie1'
>> > mkdir /usr/src/build/502950-i686/BUILD/glibc-20050106T2203/build-i686-linux/elf
>> >
>> > I think putting tst-pie1.out and tst-pie1 into generated instead would cure
>> > this.
>> 
>> I'll revert my patch now,
>
> This seems to work for me:

But why is it necessary?  Why are we using both
tests: $(objpfx)some-test.out
and
tests += other-test

Only the later should be needed AFAIK,

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fixes for make clean (take 2)
  2005-01-08 16:49       ` Andreas Jaeger
@ 2005-01-08 17:04         ` Jakub Jelinek
  2005-01-08 17:13           ` Andreas Jaeger
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2005-01-08 17:04 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Ulrich Drepper, Glibc hackers

On Sat, Jan 08, 2005 at 05:49:23PM +0100, Andreas Jaeger wrote:
> > This seems to work for me:
> 
> But why is it necessary?  Why are we using both
> tests: $(objpfx)some-test.out
> and
> tests += other-test
> 
> Only the later should be needed AFAIK,

tst-pie1 needs a special rule, because the general rule for building
tests is unsuitable for building PIE binaries.
If you have the special rule and tests += tst-pie1, then you get the
make warnings about overriding targets.

	Jakub

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fixes for make clean (take 2)
  2005-01-08 17:04         ` Jakub Jelinek
@ 2005-01-08 17:13           ` Andreas Jaeger
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Jaeger @ 2005-01-08 17:13 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

Jakub Jelinek <jakub@redhat.com> writes:

> On Sat, Jan 08, 2005 at 05:49:23PM +0100, Andreas Jaeger wrote:
>> > This seems to work for me:
>> 
>> But why is it necessary?  Why are we using both
>> tests: $(objpfx)some-test.out
>> and
>> tests += other-test
>> 
>> Only the later should be needed AFAIK,
>
> tst-pie1 needs a special rule, because the general rule for building
> tests is unsuitable for building PIE binaries.

Yeah - a special rule not only for execution but also for building.
Now I see...

> If you have the special rule and tests += tst-pie1, then you get the
> make warnings about overriding targets.

Thanks,
Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-08 17:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-03 11:11 Fixes for make clean Andreas Jaeger
2005-01-03 16:57 ` Ulrich Drepper
2005-01-07 12:44 ` Jakub Jelinek
2005-01-07 13:58   ` Andreas Jaeger
2005-01-08 16:39     ` [PATCH] Fixes for make clean (take 2) Jakub Jelinek
2005-01-08 16:49       ` Andreas Jaeger
2005-01-08 17:04         ` Jakub Jelinek
2005-01-08 17:13           ` Andreas Jaeger

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).