public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Long paths with ../../../../ throughout
@ 2010-01-19 17:34 Jon Grant
  2010-01-19 17:35 ` Jon Grant
  2010-01-19 18:18 ` Ian Lance Taylor
  0 siblings, 2 replies; 34+ messages in thread
From: Jon Grant @ 2010-01-19 17:34 UTC (permalink / raw)
  To: gcc

Hello

gcc -o t -###  test.c
Any easy way to evaluate and reduce command lines? Consider this:

/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o

Is actually the same as: /usr/lib/crt1.o  -- which is much clearer!

I'm using Ubuntu 9.04.

Cheers, Jon


$ gcc -o t -###  test.c
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.3-5ubuntu4'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
COLLECT_GCC_OPTIONS='-o' 't' '-mtune=generic'
 "/usr/lib/gcc/i486-linux-gnu/4.3.3/cc1" "-quiet" "test.c"
"-D_FORTIFY_SOURCE=2" "-quiet" "-dumpbase" "test.c" "-mtune=generic"
"-auxbase" "test" "-fstack-protector" "-o" "/tmp/ccoCNitV.s"
COLLECT_GCC_OPTIONS='-o' 't' '-mtune=generic'
 "as" "-Qy" "-o" "/tmp/ccKSwMpH.o" "/tmp/ccoCNitV.s"
COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-o' 't' '-mtune=generic'
 "/usr/lib/gcc/i486-linux-gnu/4.3.3/collect2" "--eh-frame-hdr" "-m"
"elf_i386" "--hash-style=both" "-dynamic-linker" "/lib/ld-linux.so.2"
"-o" "t" "-z" "relro"
"/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o"
"/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crti.o"
"/usr/lib/gcc/i486-linux-gnu/4.3.3/crtbegin.o"
"-L/usr/lib/gcc/i486-linux-gnu/4.3.3"
"-L/usr/lib/gcc/i486-linux-gnu/4.3.3"
"-L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib" "-L/lib/../lib"
"-L/usr/lib/../lib" "-L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../.."
"/tmp/ccKSwMpH.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"/usr/lib/gcc/i486-linux-gnu/4.3.3/crtend.o"
"/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crtn.o"

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

* Re: Long paths with ../../../../ throughout
  2010-01-19 17:34 Long paths with ../../../../ throughout Jon Grant
@ 2010-01-19 17:35 ` Jon Grant
  2010-01-19 17:40   ` Jon Grant
  2010-01-19 18:18 ` Ian Lance Taylor
  1 sibling, 1 reply; 34+ messages in thread
From: Jon Grant @ 2010-01-19 17:35 UTC (permalink / raw)
  To: gcc

I should add, I'm not on this mailing list, so please include my email
address in any replies.

Cheers, Jon

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

* Re: Long paths with ../../../../ throughout
  2010-01-19 17:35 ` Jon Grant
@ 2010-01-19 17:40   ` Jon Grant
  0 siblings, 0 replies; 34+ messages in thread
From: Jon Grant @ 2010-01-19 17:40 UTC (permalink / raw)
  To: gcc

2010/1/19 Jon Grant <jg@jguk.org>:
> I should add, I'm not on this mailing list, so please include my email
> address in any replies.

Also I notice lots of duplicate parameters:

Is this directory really needed twice?
-L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3

also -lgcc_s is mentioned twice, as is -gcc

Finally, could collect2 output command lines  when in -verbose mode?
Currently I can't see what parameters it is calling "ld" with.. when
ld fails.

I'm not on this mailing list, so please include my email address in any replies.

Cheers, Jon

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

* Re: Long paths with ../../../../ throughout
  2010-01-19 17:34 Long paths with ../../../../ throughout Jon Grant
  2010-01-19 17:35 ` Jon Grant
@ 2010-01-19 18:18 ` Ian Lance Taylor
  2010-01-23 16:26   ` Jon Grant
  1 sibling, 1 reply; 34+ messages in thread
From: Ian Lance Taylor @ 2010-01-19 18:18 UTC (permalink / raw)
  To: Jon Grant; +Cc: gcc

Jon Grant <jg@jguk.org> writes:

> Any easy way to evaluate and reduce command lines? Consider this:
>
> /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o
>
> Is actually the same as: /usr/lib/crt1.o  -- which is much clearer!

Using this form of path makes it easy to move an installed gcc tree to
a new location and have it continue to work correctly.  Since normal
users never see these paths, the goal is correctness rather than
clarity.

> Also I notice lots of duplicate parameters:
> 
> Is this directory really needed twice?
> -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3

No.  I would encourage you to investigate why it is happening.

> also -lgcc_s is mentioned twice, as is -gcc

This is because on some systems there is a circular dependency between
-lgcc and -lc.  Some of the functions in -lgcc require functions in
-lc.  If -lc was compiled with gcc, then on some systems some of the
functions in -lc will require -lgcc.  Fortunately the functions which
-lc requires in -lgcc will never themselves require -lc.  So
mentioning -lgcc twice, once before -lc and once after, suffices on
all systems.

> Finally, could collect2 output command lines  when in -verbose mode?
> Currently I can't see what parameters it is calling "ld" with.. when
> ld fails.

To see what collect2 is doing, use -Wl,-debug.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-01-19 18:18 ` Ian Lance Taylor
@ 2010-01-23 16:26   ` Jon Grant
  2010-01-25 18:44     ` Ian Lance Taylor
  0 siblings, 1 reply; 34+ messages in thread
From: Jon Grant @ 2010-01-23 16:26 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

Hello Ian

Thank you for the quick reply with explanations.

2010/1/19 Ian Lance Taylor <iant@google.com>:
> Jon Grant <jg@jguk.org> writes:
>
>> Any easy way to evaluate and reduce command lines? Consider this:
>>
>> /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o
>>
>> Is actually the same as: /usr/lib/crt1.o  -- which is much clearer!
>
> Using this form of path makes it easy to move an installed gcc tree to
> a new location and have it continue to work correctly.  Since normal
> users never see these paths, the goal is correctness rather than
> clarity.

Ok I understand. The reason to build it up from a root and a target
/lib/crt*.o file. I thought it would be possible to resolve the back
to a direct pathname though to use for the parameters.

I see that some of the files are located in the -L library directory
specified, crtbegin.o, crtend.o in which case, perhaps they both do
not need their full long path specified.

>> Also I notice lots of duplicate parameters:
>>
>> Is this directory really needed twice?
>> -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3
>
> No.  I would encourage you to investigate why it is happening.

i tried: gcc -o t -Wl,-debug test.c, I see collect2 gets the
duplicates passed to it, and then it passes it on to ld. I would have
thought that if collect2 was compiled with define
LINK_ELIMINATE_DUPLICATE_LDIRECTORIES it would strip out the duplicate
parameters before calling ld.  It does not appear to be switched on in
this Ubuntu package I am using though. Is it on by default?


>> also -lgcc_s is mentioned twice, as is -gcc
>
> This is because on some systems there is a circular dependency between
> -lgcc and -lc.  Some of the functions in -lgcc require functions in
> -lc.  If -lc was compiled with gcc, then on some systems some of the
> functions in -lc will require -lgcc.  Fortunately the functions which
> -lc requires in -lgcc will never themselves require -lc.  So
> mentioning -lgcc twice, once before -lc and once after, suffices on
> all systems.
>
>> Finally, could collect2 output command lines  when in -verbose mode?
>> Currently I can't see what parameters it is calling "ld" with.. when
>> ld fails.
>
> To see what collect2 is doing, use -Wl,-debug. Is this documented

If I add this to my existing command line I see there not any output:
$ gcc -### -o t -Wl,-debug test.c

If I change to not have -### I see it does work, not sure why.

So I understand that this passes -debug to collect2. As collect2 only
has -v mode to display version. Would a patch to add --help to it be
supported? Also could describe something about collect2's purpose at
the top of that --help output.

Additional queries:

1) collect.c:scan_libraries may not find ldd, in which case it
displays message on output, and returns as normal. Should it not be
fatal if ldd is required?

2) in collect2.c:main "-debug" is checked, and variable debug set to 1
(perhaps that should be "true" to match the style of other flags)

Please keep my email address in any reply.

Cheers, Jon

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

* Re: Long paths with ../../../../ throughout
  2010-01-23 16:26   ` Jon Grant
@ 2010-01-25 18:44     ` Ian Lance Taylor
  2010-02-02 22:38       ` Jon
  0 siblings, 1 reply; 34+ messages in thread
From: Ian Lance Taylor @ 2010-01-25 18:44 UTC (permalink / raw)
  To: Jon Grant; +Cc: gcc

Jon Grant <jg@jguk.org> writes:

> I see that some of the files are located in the -L library directory
> specified, crtbegin.o, crtend.o in which case, perhaps they both do
> not need their full long path specified.

Most linkers do not use the -L path to search for file names on the
command line.


>>> Also I notice lots of duplicate parameters:
>>>
>>> Is this directory really needed twice?
>>> -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3
>>
>> No.  I would encourage you to investigate why it is happening.
>
> i tried: gcc -o t -Wl,-debug test.c, I see collect2 gets the
> duplicates passed to it, and then it passes it on to ld. I would have
> thought that if collect2 was compiled with define
> LINK_ELIMINATE_DUPLICATE_LDIRECTORIES it would strip out the duplicate
> parameters before calling ld.  It does not appear to be switched on in
> this Ubuntu package I am using though. Is it on by default?

No.  It was introduced only to avoid an error in the linker in some
version of SGI Irix.  Generally the duplicate -L option does no harm.

I was actually thinking along of the lines of eliminating it earlier
in the process.  Why does the directory get in there twice in the
first place?


>> To see what collect2 is doing, use -Wl,-debug
>
> If I add this to my existing command line I see there not any output:
> $ gcc -### -o t -Wl,-debug test.c
>
> If I change to not have -### I see it does work, not sure why.

-### controls the gcc driver, not the collect2 program.


> So I understand that this passes -debug to collect2. As collect2 only
> has -v mode to display version. Would a patch to add --help to it be
> supported? Also could describe something about collect2's purpose at
> the top of that --help output.

I think that ordinary uses of -Wl,--help will expect to see the --help
option for the linker, not for collect2.  That said, I think it would
be OK to add a --help option for collect2 which issued some output and
then went on to invoke the linker.


> 1) collect.c:scan_libraries may not find ldd, in which case it
> displays message on output, and returns as normal. Should it not be
> fatal if ldd is required?

It seems to me that it gives an error message, which should cause
collect2 to exit with a non-zero status.  Does that not happen for
you?  Note that ldd is only required on HP/UX.


> 2) in collect2.c:main "-debug" is checked, and variable debug set to 1
> (perhaps that should be "true" to match the style of other flags)

Yes, and debug should be changed from int to bool.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-01-25 18:44     ` Ian Lance Taylor
@ 2010-02-02 22:38       ` Jon
  2010-02-02 22:47         ` Ian Lance Taylor
  0 siblings, 1 reply; 34+ messages in thread
From: Jon @ 2010-02-02 22:38 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

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

Hi Ian, Thank you for your reply.

Ian Lance Taylor wrote:
> Jon Grant <jg@jguk.org> writes:
> 
>> I see that some of the files are located in the -L library directory
>> specified, crtbegin.o, crtend.o in which case, perhaps they both do
>> not need their full long path specified.
> 
> Most linkers do not use the -L path to search for file names on the
> command line.

OK.

>>>> Also I notice lots of duplicate parameters:
>>>>
>>>> Is this directory really needed twice?
>>>> -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3
>>> No.  I would encourage you to investigate why it is happening.
>> i tried: gcc -o t -Wl,-debug test.c, I see collect2 gets the
>> duplicates passed to it, and then it passes it on to ld. I would have
>> thought that if collect2 was compiled with define
>> LINK_ELIMINATE_DUPLICATE_LDIRECTORIES it would strip out the duplicate
>> parameters before calling ld.  It does not appear to be switched on in
>> this Ubuntu package I am using though. Is it on by default?
> 
> No.  It was introduced only to avoid an error in the linker in some
> version of SGI Irix.  Generally the duplicate -L option does no harm.
> 
> I was actually thinking along of the lines of eliminating it earlier
> in the process.  Why does the directory get in there twice in the
> first place?

OK, yes I agree, the earlier the better. However, I don't (yet) know
enough about GCC, also, don't have time to scratch this itch currently.

>>> To see what collect2 is doing, use -Wl,-debug
>> If I add this to my existing command line I see there not any output:
>> $ gcc -### -o t -Wl,-debug test.c
>>
>> If I change to not have -### I see it does work, not sure why.
> 
> -### controls the gcc driver, not the collect2 program.

Ok, I realised -### means the commands are not executed, which 
explains why collect2 output was not visible.

>> So I understand that this passes -debug to collect2. As collect2 only
>> has -v mode to display version. Would a patch to add --help to it be
>> supported? Also could describe something about collect2's purpose at
>> the top of that --help output.
> 
> I think that ordinary uses of -Wl,--help will expect to see the --help
> option for the linker, not for collect2.  That said, I think it would
> be OK to add a --help option for collect2 which issued some output and
> then went on to invoke the linker.

OK, I'll prepare a patch for this change. Also I'd like to add
--version alias of current -v too.

>> 1) collect.c:scan_libraries may not find ldd, in which case it
>> displays message on output, and returns as normal. Should it not be
>> fatal if ldd is required?
> 
> It seems to me that it gives an error message, which should cause
> collect2 to exit with a non-zero status.  Does that not happen for
> you?  Note that ldd is only required on HP/UX.

Just checked again, you are correct.

>> 2) in collect2.c:main "-debug" is checked, and variable debug set to 1
>> (perhaps that should be "true" to match the style of other flags)
> 
> Yes, and debug should be changed from int to bool.

Ok, I'll reply with a patch soon.

Something else, as there isn't a man page for collect2, could one be
created? I don't know if the -Wl,-debug option is documented somewhere
else currently. This is the only page I found:
http://gcc.gnu.org/onlinedocs/gccint/Collect2.html

Is there a way to get collect2 to save the temporary .c file it
generates to have a look at it? I believe it may be the __main() 
function, with the -debug option it gives the attached 
gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file 
though it is empty, any ideas?


I'm trying to build GCC trunk, with this line below. I've installed 
the mpfr, gmp and mpc dev packges for Ubuntu 9.10, so not sure where 
to investigate next

$ ./configure --with-mpfr=/usr --with-gmp=/usr -with-mpc=/usr

[snip]

checking for correct version of mpfr.h... yes
checking for the correct version of mpc.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.2+ and MPC 
0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html

Thank you for your help so far.

Please include my address in replies.

Cheers, Jon

[-- Attachment #2: gplusplus_collect2_log.txt --]
[-- Type: text/plain, Size: 3019 bytes --]


jon@netbook:~/dev$ cat test.cpp
#include <string>
#include <stdio.h>

std::string hello("Hello world!");

int main(void)
{
	printf("%s\n", hello.c_str());

	return 0;
}

jon@netbook:~/dev$ g++ -Wl,-debug -o t test.cpp
Convert string '/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/' into prefixes, separator = ':'
  - add prefix: /usr/lib/gcc/i486-linux-gnu/4.4.1/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/4.4.1/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/4.4.1/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/4.4.1/
  - add prefix: /usr/lib/gcc/i486-linux-gnu/
Convert string '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' into prefixes, separator = ':'
  - add prefix: /usr/local/sbin/
  - add prefix: /usr/local/bin/
  - add prefix: /usr/sbin/
  - add prefix: /usr/bin/
  - add prefix: /sbin/
  - add prefix: /bin/
  - add prefix: /usr/games/
Looking for 'real-ld'
Looking for 'collect-ld'
Looking for 'ld'
Looking for 'ld'
Looking for 'gnm'
Looking for 'gnm'
Looking for 'nm'
Looking for 'nm'
Looking for 'gstrip'
Looking for 'gstrip'
Looking for 'strip'
Looking for 'strip'
Looking for 'g++'
Looking for 'g++'
collect2 version 4.4.1 (i386 Linux/ELF)
ld_file_name        = /usr/bin/ld
c_file_name         = /usr/bin/g++
nm_file_name        = /usr/bin/nm
strip_file_name     = /usr/bin/strip
c_file              = /tmp/ccyBAI9V.c
o_file              = /tmp/ccQFkOYH.o
COLLECT_GCC_OPTIONS = '-o' 't' '-shared-libgcc' '-mtune=generic' '-march=i486'
COLLECT_GCC         = g++
COMPILER_PATH       = /usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/
LIBRARY_PATH        = /usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../:/lib/:/usr/lib/:/usr/lib/i486-linux-gnu/

/usr/bin/ld --build-id --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 -o t -z relro /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.4.1/crtbegin.o -L/usr/lib/gcc/i486-linux-gnu/4.4.1 -L/usr/lib/gcc/i486-linux-gnu/4.4.1 -L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.1/../../.. -L/usr/lib/i486-linux-gnu /tmp/ccClpCtg.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/i486-linux-gnu/4.4.1/crtend.o /usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crtn.o
[Leaving /tmp/ccyBAI9V.c]
[Leaving /tmp/ccQFkOYH.o]
jon@netbook:~/dev$ 


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

* Re: Long paths with ../../../../ throughout
  2010-02-02 22:38       ` Jon
@ 2010-02-02 22:47         ` Ian Lance Taylor
  2010-02-03 21:56           ` Jon
  2011-07-02 22:04           ` Jon Grant
  0 siblings, 2 replies; 34+ messages in thread
From: Ian Lance Taylor @ 2010-02-02 22:47 UTC (permalink / raw)
  To: Jon; +Cc: gcc

Jon <jg@jguk.org> writes:

> Is there a way to get collect2 to save the temporary .c file it
> generates to have a look at it? I believe it may be the __main()
> function, with the -debug option it gives the attached
> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file
> though it is empty, any ideas?

Using -debug will direct collect2 to save the temporary .c file when
it creates one.  However, in ordinary use on GNU/Linux, collect2 will
never generate a temporary .c file.


> checking for correct version of mpfr.h... yes
> checking for the correct version of mpc.h... no
> configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.2+ and MPC
> 0.8.0+.
> Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
> their locations.  Source code for these libraries can be found at
> their respective hosting sites as well as at
> ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
> http://gcc.gnu.org/install/prerequisites.html
>
> Thank you for your help so far.

Take a look at the config.log file to see the test that failed.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-02-02 22:47         ` Ian Lance Taylor
@ 2010-02-03 21:56           ` Jon
  2010-02-03 22:46             ` Jon
  2010-02-04  1:01             ` Ian Lance Taylor
  2011-07-02 22:04           ` Jon Grant
  1 sibling, 2 replies; 34+ messages in thread
From: Jon @ 2010-02-03 21:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

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

Hello Ian

Thank you for your reply.

Ian Lance Taylor wrote:
> Jon <jg@jguk.org> writes:
> 
>> Is there a way to get collect2 to save the temporary .c file it
>> generates to have a look at it? I believe it may be the __main()
>> function, with the -debug option it gives the attached
>> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file
>> though it is empty, any ideas?
> 
> Using -debug will direct collect2 to save the temporary .c file when
> it creates one.  However, in ordinary use on GNU/Linux, collect2 will
> never generate a temporary .c file.

Is there any information about how GCC start up constructors for C/C++ 
are generated and called before main you could point me to please. I'd 
like to understand how it works.

[.]
> Take a look at the config.log file to see the test that failed.

Thanks, I had ibgmp3-dev, libmpfr-dev, libmpc-dev missing. The former 
is 0.7-1 in current Ubuntu, so I took from April's pre-release package 
(and deps). Not sure if this has been discussed, but my feedback would 
be for gcc build not to depend on packages until they are in the 
mainstream distros.

I've attached collect2 patch. Let me know what you think of it.

If happy with the patch. I'll prepare another which changes all the 
int 0/1 flags to be bool and true/false.

Please include my address in any replies.

Best regards, Jon


2010-02-03  Jon Grant  <jg.soft@jguk.org>

	* collect2.c: Handle --version as well as -v.
	Likewise handle --help as well as -h.
	Display Usage when --help given on command line.
	vflag, debug (and additional helpflag) use bool instead of int.

[-- Attachment #2: collect2_jg.patch --]
[-- Type: text/x-patch, Size: 2196 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,17 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "collect2 is a GCC utility to arrange and call ");
+      fprintf (stderr, "various initialization functions at start time.\n");
+      fprintf (stderr, "Wrapping the linker and generating an additional ");
+      fprintf (stderr, "temporary `.c' of constructor fnctions if needed.\n");
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, "  -v, --version   Display version\n");
+      fprintf (stderr, "  -debug          Enable debug output. `gcc -Wl,-debug'\n");
+    }
+
   if (debug)
     {
       const char *ptr;

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

* Re: Long paths with ../../../../ throughout
  2010-02-03 21:56           ` Jon
@ 2010-02-03 22:46             ` Jon
  2010-02-04  1:01             ` Ian Lance Taylor
  1 sibling, 0 replies; 34+ messages in thread
From: Jon @ 2010-02-03 22:46 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

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

Updated patch attached which includes collect2.h change to bool.

Please include my address in any replies.
Best regards, Jon

[-- Attachment #2: collect2_inc_h.patch --]
[-- Type: text/x-patch, Size: 2646 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,17 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "collect2 is a GCC utility to arrange and call ");
+      fprintf (stderr, "various initialization functions at start time.\n");
+      fprintf (stderr, "Wrapping the linker and generating an additional ");
+      fprintf (stderr, "temporary `.c' of constructor fnctions if needed.\n");
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, "  -v, --version   Display version\n");
+      fprintf (stderr, "  -debug          Enable debug output. `gcc -Wl,-debug'\n");
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-02-03 21:56           ` Jon
  2010-02-03 22:46             ` Jon
@ 2010-02-04  1:01             ` Ian Lance Taylor
  2010-02-05 20:38               ` Jon
  2010-02-20  7:57               ` Jon
  1 sibling, 2 replies; 34+ messages in thread
From: Ian Lance Taylor @ 2010-02-04  1:01 UTC (permalink / raw)
  To: Jon; +Cc: gcc

Jon <jg@jguk.org> writes:

> Is there any information about how GCC start up constructors for C/C++
> are generated and called before main you could point me to please. I'd
> like to understand how it works.

Second half of http://www.airs.com/blog/archives/51 .

> I've attached collect2 patch. Let me know what you think of it.

There is actually a GNU standard for --help output, and collect2 might
as well follow it.

http://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html

Do you have a copyright assignment/disclaimer with the FSF?

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-02-04  1:01             ` Ian Lance Taylor
@ 2010-02-05 20:38               ` Jon
  2010-02-20  7:57               ` Jon
  1 sibling, 0 replies; 34+ messages in thread
From: Jon @ 2010-02-05 20:38 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

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

Hello Ian

Ian Lance Taylor wrote:
[.]
>> I've attached collect2 patch. Let me know what you think of it.
> 
> There is actually a GNU standard for --help output, and collect2 might
> as well follow it.
> 
> http://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html

Ok, looks good, I've updated the changes, please find attached revised 
patch.

> Do you have a copyright assignment/disclaimer with the FSF?

I asked FSF this week, I'm just waiting for the snail mail to arrive. 
Will post it back as soon as it does.

Cheers, Jon

[-- Attachment #2: collect2_help.patch --]
[-- Type: text/x-patch, Size: 2718 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: http://gcc.gnu.org/\n");
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-02-04  1:01             ` Ian Lance Taylor
  2010-02-05 20:38               ` Jon
@ 2010-02-20  7:57               ` Jon
  2010-02-20 11:48                 ` Joseph S. Myers
  1 sibling, 1 reply; 34+ messages in thread
From: Jon @ 2010-02-20  7:57 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

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

Hi Ian

Ian Lance Taylor wrote, On 04/02/10 00:48:
> Jon <jg@jguk.org> writes:
[.]
>> I've attached collect2 patch. Let me know what you think of it.
> 
> There is actually a GNU standard for --help output, and collect2 might
> as well follow it.
> 
> http://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html

That's good. Please find updated patch attached.

> Do you have a copyright assignment/disclaimer with the FSF?

Just got email notification from FSF that they received my GCC
copyright assignment.

Cheers, Jon

[-- Attachment #2: collect2_feb_20_help.patch --]
[-- Type: text/x-patch, Size: 2718 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: http://gcc.gnu.org/\n");
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-02-20  7:57               ` Jon
@ 2010-02-20 11:48                 ` Joseph S. Myers
  2010-02-21  0:43                   ` Jon
  0 siblings, 1 reply; 34+ messages in thread
From: Joseph S. Myers @ 2010-02-20 11:48 UTC (permalink / raw)
  To: Jon; +Cc: Ian Lance Taylor, gcc

On Sat, 20 Feb 2010, Jon wrote:

> +      fprintf (stderr, "Report bugs: http://gcc.gnu.org/\n");

You should use bug_report_url from version.c, which can be controlled with 
--with-bugurl so that distributors only need to use one configure option 
to cause all bug reports for their distributions to be directed to 
themselves.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: Long paths with ../../../../ throughout
  2010-02-20 11:48                 ` Joseph S. Myers
@ 2010-02-21  0:43                   ` Jon
  2010-02-22  3:26                     ` Ian Lance Taylor
  0 siblings, 1 reply; 34+ messages in thread
From: Jon @ 2010-02-21  0:43 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Ian Lance Taylor, gcc

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

Joseph S. Myers wrote, On 20/02/10 11:36:
> On Sat, 20 Feb 2010, Jon wrote:
> 
>> +      fprintf (stderr, "Report bugs: http://gcc.gnu.org/\n");
> 
> You should use bug_report_url from version.c, which can be controlled with 
> --with-bugurl so that distributors only need to use one configure option 
> to cause all bug reports for their distributions to be directed to 
> themselves.

Good point. Updated patch attached for review.

Cheers, Jon

[-- Attachment #2: collect2_feb_21_help.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-02-21  0:43                   ` Jon
@ 2010-02-22  3:26                     ` Ian Lance Taylor
  2010-03-14  6:25                       ` Jon
  0 siblings, 1 reply; 34+ messages in thread
From: Ian Lance Taylor @ 2010-02-22  3:26 UTC (permalink / raw)
  To: Jon; +Cc: Joseph S. Myers, gcc

Jon <jg@jguk.org> writes:

> Good point. Updated patch attached for review.

I suppose this counts as a functionality change, and as such should
not be committed until after the release branch is made.

This is OK when we are back in stage 1, with a ChangeLog entry,
assuming it passes bootstrap (you didn't say).

Thanks.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-02-22  3:26                     ` Ian Lance Taylor
@ 2010-03-14  6:25                       ` Jon
  2010-03-15  7:35                         ` Ian Lance Taylor
  0 siblings, 1 reply; 34+ messages in thread
From: Jon @ 2010-03-14  6:25 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Joseph S. Myers, gcc

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

Hello Ian

Ian Lance Taylor wrote, On 22/02/10 03:26:
> Jon <jg@jguk.org> writes:
> 
>> Good point. Updated patch attached for review.
> 
> I suppose this counts as a functionality change, and as such should
> not be committed until after the release branch is made.
> 
> This is OK when we are back in stage 1, with a ChangeLog entry,
> assuming it passes bootstrap (you didn't say).

collect2_feb_21_help.patch attached again to go with ChangeLog:

2010-03-13  Jon Grant <04@jguk.org>
         * collect2.c: debug changed to bool so true/false can be 
used. bool helpflag added.
	* collect2.c: --version now sets vflag true. --help no sets helpflag 
true.
         * collect2.c: when --help passed, standard help information 
is output on stderr
         * collect2.h: vflag changed to bool so true/false can be used.

I think it passes bootstrap, my understanding of what is required:
./configure
make
make bootstrap

I'm new to gcc, so if some extra steps to follow please let me know
if there is an FAQ or document to follow.

How long is it until back in stage 1 development phase?

Thanks for reviewing so far
Cheers, Jon

[-- Attachment #2: collect2_feb_21_help.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-03-14  6:25                       ` Jon
@ 2010-03-15  7:35                         ` Ian Lance Taylor
  2010-04-24 22:47                           ` Jon
  0 siblings, 1 reply; 34+ messages in thread
From: Ian Lance Taylor @ 2010-03-15  7:35 UTC (permalink / raw)
  To: Jon; +Cc: gcc

Jon <jg@jguk.org> writes:

> How long is it until back in stage 1 development phase?

Reasonably soon, I hope, but there is no specific schedule.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-03-15  7:35                         ` Ian Lance Taylor
@ 2010-04-24 22:47                           ` Jon
  2010-04-24 22:54                             ` Manuel López-Ibáñez
  2010-04-25 18:06                             ` Ian Lance Taylor
  0 siblings, 2 replies; 34+ messages in thread
From: Jon @ 2010-04-24 22:47 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

Ian Lance Taylor wrote, On 15/03/10 03:12:
> Jon <jg@jguk.org> writes:
> 
>> How long is it until back in stage 1 development phase?
> 
> Reasonably soon, I hope, but there is no specific schedule.

Hi Ian,
Just wanted to ask if it had been possible to integrate the patch.

Would it be useful for me to create a bugzilla ticket and add the 
patch there?

Cheers, Jon

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

* Re: Long paths with ../../../../ throughout
  2010-04-24 22:47                           ` Jon
@ 2010-04-24 22:54                             ` Manuel López-Ibáñez
  2010-04-25 18:06                             ` Ian Lance Taylor
  1 sibling, 0 replies; 34+ messages in thread
From: Manuel López-Ibáñez @ 2010-04-24 22:54 UTC (permalink / raw)
  To: Jon; +Cc: Ian Lance Taylor, gcc

On 25 April 2010 00:19, Jon <jg@jguk.org> wrote:
> Ian Lance Taylor wrote, On 15/03/10 03:12:
>>
>> Jon <jg@jguk.org> writes:
>>
>>> How long is it until back in stage 1 development phase?
>>
>> Reasonably soon, I hope, but there is no specific schedule.
>
> Hi Ian,
> Just wanted to ask if it had been possible to integrate the patch.
>
> Would it be useful for me to create a bugzilla ticket and add the patch
> there?

That is always useful since it allows tracking why a patch was
committed (the log will contain the PR number) and find the report in
the bugzilla database.

Cheers,

Manuel.

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

* Re: Long paths with ../../../../ throughout
  2010-04-24 22:47                           ` Jon
  2010-04-24 22:54                             ` Manuel López-Ibáñez
@ 2010-04-25 18:06                             ` Ian Lance Taylor
  2010-04-25 21:15                               ` Manuel López-Ibáñez
  1 sibling, 1 reply; 34+ messages in thread
From: Ian Lance Taylor @ 2010-04-25 18:06 UTC (permalink / raw)
  To: Jon; +Cc: gcc

Jon <jg@jguk.org> writes:

> Ian Lance Taylor wrote, On 15/03/10 03:12:
>> Jon <jg@jguk.org> writes:
>>
>>> How long is it until back in stage 1 development phase?
>>
>> Reasonably soon, I hope, but there is no specific schedule.
>
> Hi Ian,
> Just wanted to ask if it had been possible to integrate the patch.

We are now back in stage 1.  I approved the patch in
http://gcc.gnu.org/ml/gcc/2010-02/msg00281.html .

Sadly, one of the many ways that I am unable to contribute to GCC is
the time consuming process of picking up approved patches and
committing them to the repository.  Can somebody with write access
take it from here?

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-04-25 18:06                             ` Ian Lance Taylor
@ 2010-04-25 21:15                               ` Manuel López-Ibáñez
  2010-04-25 21:23                                 ` Jon
  2010-04-26  4:13                                 ` Ian Lance Taylor
  0 siblings, 2 replies; 34+ messages in thread
From: Manuel López-Ibáñez @ 2010-04-25 21:15 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Jon, gcc

On 25 April 2010 20:03, Ian Lance Taylor <iant@google.com> wrote:
> Jon <jg@jguk.org> writes:
>
>> Ian Lance Taylor wrote, On 15/03/10 03:12:
>>> Jon <jg@jguk.org> writes:
>>>
>>>> How long is it until back in stage 1 development phase?
>>>
>>> Reasonably soon, I hope, but there is no specific schedule.
>>
>> Hi Ian,
>> Just wanted to ask if it had been possible to integrate the patch.
>
> We are now back in stage 1.  I approved the patch in
> http://gcc.gnu.org/ml/gcc/2010-02/msg00281.html .
>
> Sadly, one of the many ways that I am unable to contribute to GCC is
> the time consuming process of picking up approved patches and
> committing them to the repository.  Can somebody with write access
> take it from here?

Ian, how can I check that there is a copyright assignment in place?

Jon, would you mind writing a proper Changelog?

I will test that the patch still passes the regression test and commit
it for you. OK?

Cheers,

Manuel.

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

* Re: Long paths with ../../../../ throughout
  2010-04-25 21:15                               ` Manuel López-Ibáñez
@ 2010-04-25 21:23                                 ` Jon
  2010-04-25 21:39                                   ` Manuel López-Ibáñez
  2010-04-26  4:13                                 ` Ian Lance Taylor
  1 sibling, 1 reply; 34+ messages in thread
From: Jon @ 2010-04-25 21:23 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Ian Lance Taylor, gcc

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

Hi Manuel

Manuel López-Ibáñez wrote, On 25/04/10 22:00:
[.]
> Jon, would you mind writing a proper Changelog?

I've attached the Changelog I wrote before. I can change if needed, 
let me know what info I should add.

> I will test that the patch still passes the regression test and commit
> it for you. OK?

That would be great, thank you.

BTW, I returned the copyright assignment to FSF @ 17 Feb 2010, I think 
copyright-clerk@fsf.org will be able to confirm this.

Best regards, Jon

[-- Attachment #2: collect2_feb_21_help.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

[-- Attachment #3: collect2_feb_21_help_changelog.txt --]
[-- Type: text/plain, Size: 371 bytes --]

2010-03-13  Jon Grant <04@jguk.org>
        * collect2.c: debug changed to bool so true/false can be used. bool helpflag added.
        * collect2.c: --version now sets vflag true. --help no sets helpflag true.
        * collect2.c: when --help passed, standard help information is output on stderr
        * collect2.h: vflag changed to bool so true/false can be used. 

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

* Re: Long paths with ../../../../ throughout
  2010-04-25 21:23                                 ` Jon
@ 2010-04-25 21:39                                   ` Manuel López-Ibáñez
  2010-04-26 23:57                                     ` Jon
  0 siblings, 1 reply; 34+ messages in thread
From: Manuel López-Ibáñez @ 2010-04-25 21:39 UTC (permalink / raw)
  To: Jon; +Cc: Ian Lance Taylor, gcc

On 25 April 2010 23:17, Jon <jg@jguk.org> wrote:
> Hi Manuel
>
> Manuel López-Ibáñez wrote, On 25/04/10 22:00:
> [.]
>>
>> Jon, would you mind writing a proper Changelog?
>
> I've attached the Changelog I wrote before. I can change if needed, let me
> know what info I should add.

Ideally, the format should follow the example in:

http://gcc.gnu.org/wiki/ChangeLog

Basically, in your case, do not repeat the filename and mention which
function is affected (if any).

Thanks,

Manuel.

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

* Re: Long paths with ../../../../ throughout
  2010-04-25 21:15                               ` Manuel López-Ibáñez
  2010-04-25 21:23                                 ` Jon
@ 2010-04-26  4:13                                 ` Ian Lance Taylor
  1 sibling, 0 replies; 34+ messages in thread
From: Ian Lance Taylor @ 2010-04-26  4:13 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Jon, gcc

Manuel López-Ibáñez <lopezibanez@gmail.com> writes:

> Ian, how can I check that there is a copyright assignment in place?

http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html

Jon does have a copyright assignment.

Ian

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

* Re: Long paths with ../../../../ throughout
  2010-04-25 21:39                                   ` Manuel López-Ibáñez
@ 2010-04-26 23:57                                     ` Jon
  2010-04-27  0:59                                       ` Dave Korn
  0 siblings, 1 reply; 34+ messages in thread
From: Jon @ 2010-04-26 23:57 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Ian Lance Taylor, gcc

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

Hi Manuel

Manuel López-Ibáñez wrote, On 25/04/10 22:37:
[.]
> http://gcc.gnu.org/wiki/ChangeLog
> 
> Basically, in your case, do not repeat the filename and mention which
> function is affected (if any).

2010-03-13  Jon Grant <04@jguk.org>
         * collect2.h: vflag extern changed to bool so true/false can 
be used.
         * collect2.c: "debug" global variable changed to bool so 
true/false can be used.
         * "helpflag" bool global variable added.
         * (main) sets "debug" to true instead of 1 when -debug is 
passed in argv
         * --help now sets "helpflag" to true instead of 1
         * --version now sets "vflag" global bool true instead of 1
         * if "helpflag" is true, standard help information is output 
on stderr

I have reworked it into that format. I've not created PR. As approved, 
is this ok to go in without a PR?

Cheers, Jon

[-- Attachment #2: collect2_feb_21_help.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  if (helpflag)
+    {
+      fprintf (stderr, "Usage: collect2 [options]\n");
+      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
+      fprintf (stderr, " Options:\n");
+      fprintf (stderr, "  -debug          Enable debug output\n");
+      fprintf (stderr, "  --help          Display this information\n");
+      fprintf (stderr, "  -v, --version   Display this program's version number\n");
+      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
+
+      collect_exit (0);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

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

* Re: Long paths with ../../../../ throughout
  2010-04-26 23:57                                     ` Jon
@ 2010-04-27  0:59                                       ` Dave Korn
  2010-04-27  7:50                                         ` Manuel López-Ibáñez
  0 siblings, 1 reply; 34+ messages in thread
From: Dave Korn @ 2010-04-27  0:59 UTC (permalink / raw)
  To: Jon; +Cc: Manuel López-Ibáñez, Ian Lance Taylor, gcc

On 26/04/2010 23:18, Jon wrote:
> Hi Manuel
> 
> Manuel López-Ibáñez wrote, On 25/04/10 22:37:
> [.]
>> http://gcc.gnu.org/wiki/ChangeLog
>>
>> Basically, in your case, do not repeat the filename and mention which
>> function is affected (if any).
> 
> 2010-03-13  Jon Grant <04@jguk.org>
>         * collect2.h: vflag extern changed to bool so true/false can be
> used.
>         * collect2.c: "debug" global variable changed to bool so
> true/false can be used.
>         * "helpflag" bool global variable added.
>         * (main) sets "debug" to true instead of 1 when -debug is passed
> in argv
>         * --help now sets "helpflag" to true instead of 1
>         * --version now sets "vflag" global bool true instead of 1
>         * if "helpflag" is true, standard help information is output on
> stderr
> 
> I have reworked it into that format. 

  Here, sometimes it's easier to show than to explain in terms of rules:

	* collect2.c (vflag): Change type from int to bool.
	(debug): Likewise.
	(helpflag): New global bool.
	(main): Set vflag and debug with boolean, not integer truth
	values.  Accept new "--help" option and output usage text if
	found.
	* collect2.h (vflag): Update prototype.
	(debug): Likewise.

  Summary: Asterisks are only used for the first line of each file's changes.
 TABs at the start of every line.  Place the name of the affected entity -
function, variable or macro - in brackets at the start of each line, colon,
space, then say what not why.

    cheers,
      DaveK

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

* Re: Long paths with ../../../../ throughout
  2010-04-27  0:59                                       ` Dave Korn
@ 2010-04-27  7:50                                         ` Manuel López-Ibáñez
  2010-04-27 16:02                                           ` Dave Korn
  0 siblings, 1 reply; 34+ messages in thread
From: Manuel López-Ibáñez @ 2010-04-27  7:50 UTC (permalink / raw)
  To: Dave Korn; +Cc: Jon, Ian Lance Taylor, gcc

On 27 April 2010 02:16, Dave Korn <dave.korn.cygwin@googlemail.com> wrote:
>  Here, sometimes it's easier to show than to explain in terms of rules:

The wiki link has a template and an example. If you think it can be
improved, please do so.

>  Summary: Asterisks are only used for the first line of each file's changes.
>  TABs at the start of every line.  Place the name of the affected entity -
> function, variable or macro - in brackets at the start of each line, colon,
> space, then say what not why.

I will add this as well to the wiki link.

Cheers,

Manuel.

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

* Re: Long paths with ../../../../ throughout
  2010-04-27  7:50                                         ` Manuel López-Ibáñez
@ 2010-04-27 16:02                                           ` Dave Korn
  0 siblings, 0 replies; 34+ messages in thread
From: Dave Korn @ 2010-04-27 16:02 UTC (permalink / raw)
  To: Manuel López-Ibáñez; +Cc: Dave Korn, Jon, Ian Lance Taylor, gcc

On 27/04/2010 08:17, Manuel López-Ibáñez wrote:
> On 27 April 2010 02:16, Dave Korn <dave.korn.cygwin@googlemail.com> wrote:
>>  Here, sometimes it's easier to show than to explain in terms of rules:
> 
> The wiki link has a template and an example. If you think it can be
> improved, please do so.

  I hadn't even read it at that point, I just wanted to do Jon's changelog for
him so that he didn't have to go through another round of revisions!

> I will add this as well to the wiki link.

  Thanks.  I couldn't think of much else to say so I added a link to the GCS :)

    cheers,
      DaveK

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

* Re: Long paths with ../../../../ throughout
  2010-02-02 22:47         ` Ian Lance Taylor
  2010-02-03 21:56           ` Jon
@ 2011-07-02 22:04           ` Jon Grant
  2011-07-03  4:27             ` Ian Lance Taylor
  1 sibling, 1 reply; 34+ messages in thread
From: Jon Grant @ 2011-07-02 22:04 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

On 2 February 2010 22:47, Ian Lance Taylor <iant@google.com> wrote:
> Jon <jg@jguk.org> writes:
>
>> Is there a way to get collect2 to save the temporary .c file it
>> generates to have a look at it? I believe it may be the __main()
>> function, with the -debug option it gives the attached
>> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file
>> though it is empty, any ideas?
>
> Using -debug will direct collect2 to save the temporary .c file when
> it creates one.  However, in ordinary use on GNU/Linux, collect2 will
> never generate a temporary .c file.

Hello Ian,

Another reply for this old thread.  I wondered, if collect2 is
possibly not needed in normal use on GNU/Linux, could GCC be
configured to call ld directly in those cases to save launching
another binary.

Best regards, Jon

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

* Re: Long paths with ../../../../ throughout
  2011-07-02 22:04           ` Jon Grant
@ 2011-07-03  4:27             ` Ian Lance Taylor
  2011-07-03  7:33               ` Richard Guenther
  2011-07-04 20:14               ` Jon Grant
  0 siblings, 2 replies; 34+ messages in thread
From: Ian Lance Taylor @ 2011-07-03  4:27 UTC (permalink / raw)
  To: Jon Grant; +Cc: gcc

Jon Grant <jg@jguk.org> writes:

> On 2 February 2010 22:47, Ian Lance Taylor <iant@google.com> wrote:
>> Jon <jg@jguk.org> writes:
>>
>>> Is there a way to get collect2 to save the temporary .c file it
>>> generates to have a look at it? I believe it may be the __main()
>>> function, with the -debug option it gives the attached
>>> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file
>>> though it is empty, any ideas?
>>
>> Using -debug will direct collect2 to save the temporary .c file when
>> it creates one.  However, in ordinary use on GNU/Linux, collect2 will
>> never generate a temporary .c file.
>
> Hello Ian,
>
> Another reply for this old thread.  I wondered, if collect2 is
> possibly not needed in normal use on GNU/Linux, could GCC be
> configured to call ld directly in those cases to save launching
> another binary.

collect2 is needed if you use -frepo or -flto.

Ian

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

* Re: Long paths with ../../../../ throughout
  2011-07-03  4:27             ` Ian Lance Taylor
@ 2011-07-03  7:33               ` Richard Guenther
  2011-07-04 20:14               ` Jon Grant
  1 sibling, 0 replies; 34+ messages in thread
From: Richard Guenther @ 2011-07-03  7:33 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Jon Grant, gcc

On Sun, Jul 3, 2011 at 6:27 AM, Ian Lance Taylor <iant@google.com> wrote:
> Jon Grant <jg@jguk.org> writes:
>
>> On 2 February 2010 22:47, Ian Lance Taylor <iant@google.com> wrote:
>>> Jon <jg@jguk.org> writes:
>>>
>>>> Is there a way to get collect2 to save the temporary .c file it
>>>> generates to have a look at it? I believe it may be the __main()
>>>> function, with the -debug option it gives the attached
>>>> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file
>>>> though it is empty, any ideas?
>>>
>>> Using -debug will direct collect2 to save the temporary .c file when
>>> it creates one.  However, in ordinary use on GNU/Linux, collect2 will
>>> never generate a temporary .c file.
>>
>> Hello Ian,
>>
>> Another reply for this old thread.  I wondered, if collect2 is
>> possibly not needed in normal use on GNU/Linux, could GCC be
>> configured to call ld directly in those cases to save launching
>> another binary.
>
> collect2 is needed if you use -frepo or -flto.

For -flto only if you do not use a linker plugin to make lto work.

Richard.

> Ian
>

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

* Re: Long paths with ../../../../ throughout
  2011-07-03  4:27             ` Ian Lance Taylor
  2011-07-03  7:33               ` Richard Guenther
@ 2011-07-04 20:14               ` Jon Grant
  2011-07-05 18:37                 ` Ian Lance Taylor
  1 sibling, 1 reply; 34+ messages in thread
From: Jon Grant @ 2011-07-04 20:14 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

Ian Lance Taylor wrote, On 03/07/11 05:27:
> Jon Grant<jg@jguk.org>  writes:
[.]
>> Another reply for this old thread.  I wondered, if collect2 is
>> possibly not needed in normal use on GNU/Linux, could GCC be
>> configured to call ld directly in those cases to save launching
>> another binary.
>
> collect2 is needed if you use -frepo or -flto.

Hi Ian.

Not sure how easy this is, but could those options simply be checked to 
determine if the linker could be called directly? Would save launching 
collect2 then, to speed up builds a bit!

Best regards, Jon

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

* Re: Long paths with ../../../../ throughout
  2011-07-04 20:14               ` Jon Grant
@ 2011-07-05 18:37                 ` Ian Lance Taylor
  0 siblings, 0 replies; 34+ messages in thread
From: Ian Lance Taylor @ 2011-07-05 18:37 UTC (permalink / raw)
  To: Jon Grant; +Cc: gcc

Jon Grant <jg@jguk.org> writes:

> Ian Lance Taylor wrote, On 03/07/11 05:27:
>> Jon Grant<jg@jguk.org>  writes:
> [.]
>>> Another reply for this old thread.  I wondered, if collect2 is
>>> possibly not needed in normal use on GNU/Linux, could GCC be
>>> configured to call ld directly in those cases to save launching
>>> another binary.
>>
>> collect2 is needed if you use -frepo or -flto.
>
> Hi Ian.
>
> Not sure how easy this is, but could those options simply be checked
> to determine if the linker could be called directly? Would save
> launching collect2 then, to speed up builds a bit!

Sure, that seems feasible.  Want to try to tackle it?

Ian

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

end of thread, other threads:[~2011-07-05 18:37 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-19 17:34 Long paths with ../../../../ throughout Jon Grant
2010-01-19 17:35 ` Jon Grant
2010-01-19 17:40   ` Jon Grant
2010-01-19 18:18 ` Ian Lance Taylor
2010-01-23 16:26   ` Jon Grant
2010-01-25 18:44     ` Ian Lance Taylor
2010-02-02 22:38       ` Jon
2010-02-02 22:47         ` Ian Lance Taylor
2010-02-03 21:56           ` Jon
2010-02-03 22:46             ` Jon
2010-02-04  1:01             ` Ian Lance Taylor
2010-02-05 20:38               ` Jon
2010-02-20  7:57               ` Jon
2010-02-20 11:48                 ` Joseph S. Myers
2010-02-21  0:43                   ` Jon
2010-02-22  3:26                     ` Ian Lance Taylor
2010-03-14  6:25                       ` Jon
2010-03-15  7:35                         ` Ian Lance Taylor
2010-04-24 22:47                           ` Jon
2010-04-24 22:54                             ` Manuel López-Ibáñez
2010-04-25 18:06                             ` Ian Lance Taylor
2010-04-25 21:15                               ` Manuel López-Ibáñez
2010-04-25 21:23                                 ` Jon
2010-04-25 21:39                                   ` Manuel López-Ibáñez
2010-04-26 23:57                                     ` Jon
2010-04-27  0:59                                       ` Dave Korn
2010-04-27  7:50                                         ` Manuel López-Ibáñez
2010-04-27 16:02                                           ` Dave Korn
2010-04-26  4:13                                 ` Ian Lance Taylor
2011-07-02 22:04           ` Jon Grant
2011-07-03  4:27             ` Ian Lance Taylor
2011-07-03  7:33               ` Richard Guenther
2011-07-04 20:14               ` Jon Grant
2011-07-05 18:37                 ` Ian Lance Taylor

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