* C++ bootstrap of GCC - still useful ? @ 2011-07-09 20:08 Toon Moene 2011-07-09 22:05 ` Gabriel Dos Reis ` (2 more replies) 0 siblings, 3 replies; 31+ messages in thread From: Toon Moene @ 2011-07-09 20:08 UTC (permalink / raw) To: gcc mailing list All, As of a couple of months, I perform a bootstrap-with-C++ (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 UTC. I see that the build by a C++ compiler has been the subject of the GCC Gathering at Google: C++ style and migration crowl writing and using C++ in gcc It is not quite clear what the outcome of this discussion was. Is there still interest in daily builds like mine ? Kind regards, -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-09 20:08 C++ bootstrap of GCC - still useful ? Toon Moene @ 2011-07-09 22:05 ` Gabriel Dos Reis 2011-07-09 22:27 ` Hargett, Matt 2011-07-10 4:46 ` Ian Lance Taylor 2 siblings, 0 replies; 31+ messages in thread From: Gabriel Dos Reis @ 2011-07-09 22:05 UTC (permalink / raw) To: Toon Moene; +Cc: gcc mailing list On Sat, Jul 9, 2011 at 3:07 PM, Toon Moene <toon@moene.org> wrote: > Is there still interest in daily builds like mine ? Yes. I am wondering why you have to ask the question :-) -- Gaby ^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: C++ bootstrap of GCC - still useful ? 2011-07-09 20:08 C++ bootstrap of GCC - still useful ? Toon Moene 2011-07-09 22:05 ` Gabriel Dos Reis @ 2011-07-09 22:27 ` Hargett, Matt 2011-07-10 4:46 ` Ian Lance Taylor 2 siblings, 0 replies; 31+ messages in thread From: Hargett, Matt @ 2011-07-09 22:27 UTC (permalink / raw) To: Toon Moene, gcc mailing list > As of a couple of months, I perform a bootstrap-with-C++ > (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 UTC. > Is there still interest in daily builds like mine ? Absolutely! Especially if you do a profiled-bootstrap and/or LTO bootstrap in that mode. Hopefully this is feasible given the recent improvements in trunk that allowed Mozilla to be built this way. Even without those things, it's quite useful to make sure it stays working. So, thanks and keep it up :) ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-09 20:08 C++ bootstrap of GCC - still useful ? Toon Moene 2011-07-09 22:05 ` Gabriel Dos Reis 2011-07-09 22:27 ` Hargett, Matt @ 2011-07-10 4:46 ` Ian Lance Taylor 2011-07-10 7:52 ` Eric Botcazou 2011-07-10 18:03 ` Toon Moene 2 siblings, 2 replies; 31+ messages in thread From: Ian Lance Taylor @ 2011-07-10 4:46 UTC (permalink / raw) To: Toon Moene; +Cc: gcc mailing list Toon Moene <toon@moene.org> writes: > As of a couple of months, I perform a bootstrap-with-C++ > (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 > UTC. > > I see that the build by a C++ compiler has been the subject of the GCC > Gathering at Google: > > C++ style and migration crowl writing and using C++ in gcc > > It is not quite clear what the outcome of this discussion was. > > Is there still interest in daily builds like mine ? Yes, it's definitely useful. The immediate blocker to using C++ in gcc is the Ada frontend. --enable-build-with-cxx and --enable-languages=ada do not work together. Ian ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 4:46 ` Ian Lance Taylor @ 2011-07-10 7:52 ` Eric Botcazou 2011-07-11 16:47 ` Ian Lance Taylor 2011-07-10 18:03 ` Toon Moene 1 sibling, 1 reply; 31+ messages in thread From: Eric Botcazou @ 2011-07-10 7:52 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gcc, Toon Moene > The immediate blocker to using C++ in gcc is the Ada frontend. > --enable-build-with-cxx and --enable-languages=ada do not work together. Could you elaborate? -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 7:52 ` Eric Botcazou @ 2011-07-11 16:47 ` Ian Lance Taylor 2011-07-11 16:53 ` Arnaud Charlet 2011-07-11 19:00 ` Eric Botcazou 0 siblings, 2 replies; 31+ messages in thread From: Ian Lance Taylor @ 2011-07-11 16:47 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc, Toon Moene Eric Botcazou <ebotcazou@adacore.com> writes: >> The immediate blocker to using C++ in gcc is the Ada frontend. >> --enable-build-with-cxx and --enable-languages=ada do not work together. > > Could you elaborate? When I configure with --enable-build-with-cxx --enable-languages=c,c++,ada I get the appended. The problem is that the Ada code is looking for C symbol names but the names in the .o files are mangled for C++. Ian gcc -static-libgcc -o gnatbind ada/b_gnatb.o ada/adaint.o ada/argv.o ada/exit.o ada/cio.o ada/cstreams.o ada/env.o ada/final.o ada/init.o ada/initialize.o ada/seh_init.o ada/link.o ada/targext.o ada/raise.o ada/tracebak.o ada/ada.o ada/a-clrefi.o ada/a-comlin.o ada/a-elchha.o ada/a-except.o ada/ali-util.o ada/ali.o ada/alloc.o ada/aspects.o ada/atree.o ada/bcheck.o ada/binde.o ada/binderr.o ada/bindgen.o ada/bindusg.o ada/butil.o ada/casing.o ada/csets.o ada/debug.o ada/einfo.o ada/elists.o ada/err_vars.o ada/errout.o ada/erroutc.o ada/fmap.o ada/fname.o ada/g-hesora.o ada/g-htable.o ada/s-os_lib.o ada/s-string.o ada/gnat.o ada/gnatbind.o ada/gnatvsn.o ada/hostparm.o ada/interfac.o ada/lib.o ada/namet.o ada/nlists.o ada/opt.o ada/osint-b.o ada/osint.o ada/output.o ada/rident.o ada/s-addope.o ada/s-assert.o ada/s-carun8.o ada/s-casuti.o ada/s-conca2.o ada/s-conca3.o ada/s-conca4.o ada/s-conca5.o ada/s-conca6.o ada/s-conca7.o ada/s-conca8.o ada/s-conca9.o ada/s-crc32.o ada/s-crtl.o ada/s-except.o ada/s-exctab.o ada/s-htable.o ada/s-imenne.o ada/s-imgenu.o ada/s-mastop.o ada/s-memory.o ada/s-parame.o ada/s-restri.o ada/s-secsta.o ada/s-soflin.o ada/s-sopco3.o ada/s-sopco4.o ada/s-sopco5.o ada/s-stache.o ada/s-stalib.o ada/s-stoele.o ada/s-strhas.o ada/s-strops.o ada/s-traceb.o ada/s-traent.o ada/s-unstyp.o ada/s-utf_32.o ada/s-wchcnv.o ada/s-wchcon.o ada/s-wchjis.o ada/scng.o ada/scans.o ada/scil_ll.o ada/sdefault.o ada/sem_aux.o ada/sinfo.o ada/sinput.o ada/sinput-c.o ada/snames.o ada/stand.o ada/stringt.o ada/switch-b.o ada/switch.o ada/style.o ada/styleg.o ada/stylesw.o ada/system.o ada/table.o ada/targparm.o ada/tree_io.o ada/types.o ada/uintp.o ada/uname.o ada/urealp.o ada/widechar.o ggc-none.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -g ada/b_gnatb.o: In function `adainit': /home/ian/gcc/build-with-cxx-ada/gcc/ada/b_gnatb.adb:122: undefined reference to `__gnat_install_handler' ada/b_gnatb.o: In function `main': /home/ian/gcc/build-with-cxx-ada/gcc/ada/b_gnatb.adb:250: undefined reference to `__gnat_initialize' /home/ian/gcc/build-with-cxx-ada/gcc/ada/b_gnatb.adb:255: undefined reference to `__gnat_finalize' ada/init.o: In function `__gnat_error_handler': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/init.c:661: undefined reference to `ada__exceptions__raise_from_signal_handler(Exception_Data*, char const*)' ada/a-comlin.o: In function `ada__command_line__argument': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-comlin.adb:75: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-comlin.adb:77: undefined reference to `__gnat_fill_arg' ada/a-comlin.o: In function `ada__command_line__argument_count': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-comlin.adb:94: undefined reference to `__gnat_arg_count' ada/a-comlin.o: In function `ada__command_line__command_name': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-comlin.adb:123: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-comlin.adb:126: undefined reference to `__gnat_fill_arg' ada/a-elchha.o: In function `__gnat_last_chance_handler': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-elchha.adb:137: undefined reference to `__gnat_unhandled_terminate' ada/a-except.o: In function `__gnat_to_stderr_char': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-except.adb:1314: undefined reference to `put_char_stderr' ada/a-except.o: In function `ada__exceptions__process_raise_exception': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/a-except.adb:748: undefined reference to `_gnat_builtin_longjmp' ada/fmap.o: In function `fmap__update_mapping_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/fmap.adb:498: undefined reference to `__gnat_lseek' ada/s-os_lib.o: In function `system__os_lib__copy_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:569: undefined reference to `__gnat_lseek' ada/s-os_lib.o: In function `system__os_lib__copy_file__copy_to': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:482: undefined reference to `__gnat_copy_attribs' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:487: undefined reference to `__gnat_copy_attribs' ada/s-os_lib.o: In function `system__os_lib__copy_time_stamps': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:637: undefined reference to `__gnat_copy_attribs' ada/s-os_lib.o: In function `system__os_lib__create_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:679: undefined reference to `__gnat_open_create' ada/s-os_lib.o: In function `system__os_lib__create_new_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:708: undefined reference to `__gnat_open_new' ada/s-os_lib.o: In function `system__os_lib__create_output_text_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:737: undefined reference to `__gnat_create_output_file' ada/s-os_lib.o: In function `system__os_lib__create_temp_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:754: undefined reference to `__gnat_open_new_temp' ada/s-os_lib.o: In function `system__os_lib__create_temp_file_internal__create_new_output_text_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:809: undefined reference to `__gnat_create_output_file_new' ada/s-os_lib.o: In function `system__os_lib__delete_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:908: undefined reference to `__gnat_unlink' ada/s-os_lib.o: In function `system__os_lib__file_time_stamp__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:930: undefined reference to `__gnat_file_time_fd' ada/s-os_lib.o: In function `system__os_lib__file_time_stamp__3': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:937: undefined reference to `__gnat_file_time_name' ada/s-os_lib.o: In function `system__os_lib__get_debuggable_suffix': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:964: undefined reference to `__gnat_get_debuggable_suffix_ptr' ada/s-os_lib.o: In function `system__os_lib__get_executable_suffix': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:991: undefined reference to `__gnat_get_executable_suffix_ptr' ada/s-os_lib.o: In function `system__os_lib__get_object_suffix': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1018: undefined reference to `__gnat_get_object_suffix_ptr' ada/s-os_lib.o: In function `system__os_lib__getenv': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1139: undefined reference to `__gnat_getenv' ada/s-os_lib.o: In function `system__os_lib__gm_split': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1281: undefined reference to `__gnat_to_gm_time' ada/s-os_lib.o: In function `system__os_lib__is_absolute_path': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1330: undefined reference to `__gnat_is_absolute_path' ada/s-os_lib.o: In function `system__os_lib__is_directory__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1341: undefined reference to `__gnat_is_directory' ada/s-os_lib.o: In function `system__os_lib__is_readable_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1360: undefined reference to `__gnat_is_readable_file' ada/s-os_lib.o: In function `system__os_lib__is_executable_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1379: undefined reference to `__gnat_is_executable_file' ada/s-os_lib.o: In function `system__os_lib__is_regular_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1398: undefined reference to `__gnat_is_regular_file' ada/s-os_lib.o: In function `system__os_lib__is_symbolic_link__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1417: undefined reference to `__gnat_is_symbolic_link' ada/s-os_lib.o: In function `system__os_lib__is_writable_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1436: undefined reference to `__gnat_is_writable_file' ada/s-os_lib.o: In function `system__os_lib__locate_exec_on_path': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1469: undefined reference to `__gnat_locate_exec_on_path' ada/s-os_lib.o: In function `system__os_lib__locate_regular_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1515: undefined reference to `__gnat_locate_regular_file' ada/s-os_lib.o: In function `system__os_lib__non_blocking_spawn__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1592: undefined reference to `__gnat_dup' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1593: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1596: undefined reference to `__gnat_dup' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1597: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1606: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1609: undefined reference to `__gnat_dup2' ada/s-os_lib.o: In function `system__os_lib__normalize_pathname': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1788: undefined reference to `__gnat_get_file_names_case_sensitive' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1937: undefined reference to `__gnat_to_canonical_file_spec' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2171: undefined reference to `__gnat_readlink' ada/s-os_lib.o: In function `system__os_lib__normalize_pathname__get_directory': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:1899: undefined reference to `__gnat_get_current_dir' ada/s-os_lib.o: In function `system__os_lib__open_read__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2230: undefined reference to `__gnat_open_read' ada/s-os_lib.o: In function `system__os_lib__open_read_write__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2257: undefined reference to `__gnat_open_rw' ada/s-os_lib.o: In function `system__os_lib__os_exit_default': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2290: undefined reference to `__gnat_os_exit' ada/s-os_lib.o: In function `system__os_lib__rename_file__2': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2332: undefined reference to `__gnat_rename' ada/s-os_lib.o: In function `system__os_lib__set_close_on_exec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2365: undefined reference to `__gnat_set_close_on_exec' ada/s-os_lib.o: In function `system__os_lib__set_executable': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2379: undefined reference to `__gnat_set_executable' ada/s-os_lib.o: In function `system__os_lib__set_non_readable': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2393: undefined reference to `__gnat_set_non_readable' ada/s-os_lib.o: In function `system__os_lib__set_non_writable': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2407: undefined reference to `__gnat_set_non_writable' ada/s-os_lib.o: In function `system__os_lib__set_readable': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2421: undefined reference to `__gnat_set_readable' ada/s-os_lib.o: In function `system__os_lib__set_writable': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2435: undefined reference to `__gnat_set_writable' ada/s-os_lib.o: In function `system__os_lib__setenv': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2456: undefined reference to `__gnat_setenv' ada/s-os_lib.o: In function `system__os_lib__spawn__3': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2497: undefined reference to `__gnat_dup' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2498: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2501: undefined reference to `__gnat_dup' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2502: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2511: undefined reference to `__gnat_dup2' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2514: undefined reference to `__gnat_dup2' ada/s-os_lib.o: In function `system__os_lib__spawn_internal__spawn': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2639: undefined reference to `__gnat_portable_spawn' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2641: undefined reference to `__gnat_portable_no_block_spawn' ada/s-os_lib.o: In function `system__os_lib__wait_process': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-os_lib.adb:2710: undefined reference to `__gnat_portable_wait' ada/gnatbind.o: In function `_ada_gnatbind': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/gnatbind.adb:505: undefined reference to `__gnat_arg_count' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/gnatbind.adb:507: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/gnatbind.adb:509: undefined reference to `__gnat_fill_arg' ada/gnatbind.o: In function `gnatbind__check_version_and_help': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/switch.adb:62: undefined reference to `__gnat_arg_count' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/switch.adb:64: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/switch.adb:66: undefined reference to `__gnat_fill_arg' ada/gnatbind.o: In function `gnatbind__gnatbind_supports_auto_init': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/gnatbind.adb:119: undefined reference to `__gnat_binder_supports_auto_init' ada/hostparm.o: In function `hostparm___elabs': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/hostparm.ads:47: undefined reference to `__gnat_vmsp' ada/opt.o: In function `opt___elabs': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/opt.ads:1902: undefined reference to `get_gcc_version' ada/osint.o: In function `osint__add_default_search_dirs__get_dirs_from_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:363: undefined reference to `__gnat_file_length' ada/osint.o: In function `osint__add_default_search_dirs__get_libraries_from_registry': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:433: undefined reference to `__gnat_get_libraries_from_registry' ada/osint.o: In function `osint__executable_prefix': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:981: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:982: undefined reference to `__gnat_fill_arg' ada/osint.o: In function `osint__file_length': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1073: undefined reference to `__gnat_file_length_attr' ada/osint.o: In function `osint__file_time_stamp': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1087: undefined reference to `__gnat_file_time_name_attr' ada/osint.o: In function `osint__find_program_name': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1254: undefined reference to `__gnat_len_arg' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1259: undefined reference to `__gnat_fill_arg' ada/osint.o: In function `osint__get_rts_search_dir': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1540: undefined reference to `__gnat_get_current_dir' ada/osint.o: In function `osint__is_directory': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1679: undefined reference to `__gnat_is_directory_attr' ada/osint.o: In function `osint__is_executable_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1723: undefined reference to `__gnat_is_executable_file_attr' ada/osint.o: In function `osint__is_readable_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1736: undefined reference to `__gnat_is_readable_file_attr' ada/osint.o: In function `osint__is_regular_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1749: undefined reference to `__gnat_is_regular_file_attr' ada/osint.o: In function `osint__is_symbolic_link': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1762: undefined reference to `__gnat_is_symbolic_link_attr' ada/osint.o: In function `osint__is_writable_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:1775: undefined reference to `__gnat_is_writable_file_attr' ada/osint.o: In function `osint__read_default_search_dirs': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:2311: undefined reference to `__gnat_file_length' ada/osint.o: In function `osint__read_source_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:2649: undefined reference to `__gnat_file_length' ada/osint.o: In function `osint__relocate_path': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:2734: undefined reference to `set_std_prefix' ada/osint.o: In function `osint__to_canonical_dir_spec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:2952: undefined reference to `__gnat_to_canonical_dir_spec' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:2954: undefined reference to `__gnat_to_canonical_dir_spec' ada/osint.o: In function `osint__to_canonical_file_list': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3003: undefined reference to `__gnat_to_canonical_file_list_init' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3015: undefined reference to `__gnat_to_canonical_file_list_next' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3023: undefined reference to `__gnat_to_canonical_file_list_free' ada/osint.o: In function `osint__to_canonical_file_spec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3048: undefined reference to `__gnat_to_canonical_file_spec' ada/osint.o: In function `osint__to_canonical_path_spec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3083: undefined reference to `__gnat_to_canonical_path_spec' ada/osint.o: In function `osint__to_host_dir_spec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3119: undefined reference to `__gnat_to_host_dir_spec' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3121: undefined reference to `__gnat_to_host_dir_spec' ada/osint.o: In function `osint__to_host_file_spec': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3150: undefined reference to `__gnat_to_host_file_spec' ada/osint.o: In function `osint__update_path': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3216: undefined reference to `update_path' ada/osint.o: In function `osint___elabb': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3314: undefined reference to `__gnat_size_of_file_attributes' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3316: undefined reference to `__gnat_reset_attributes' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3318: undefined reference to `__gnat_get_default_identifier_character_set' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.adb:3319: undefined reference to `__gnat_get_maximum_file_name_length' ada/osint.o: In function `osint___elabs': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.ads:84: undefined reference to `__gnat_get_file_names_case_sensitive' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.ads:101: undefined reference to `__gnat_get_env_vars_case_sensitive' /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/osint.ads:698: undefined reference to `__gnat_arg_count' ada/s-traceb.o: In function `system__traceback__call_chain': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/s-traceb.adb:86: undefined reference to `__gnat_backtrace' ada/sinput-c.o: In function `sinput__c__load_file': /home/ian/gcc/build-with-cxx-ada/gcc/../../trunk/gcc/ada/sinput-c.adb:92: undefined reference to `__gnat_file_length' collect2: ld returned 1 exit status make[3]: *** [gnatbind] Error 1 ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 16:47 ` Ian Lance Taylor @ 2011-07-11 16:53 ` Arnaud Charlet 2011-07-11 16:59 ` Paul Koning 2011-07-11 17:28 ` Gabriel Dos Reis 2011-07-11 19:00 ` Eric Botcazou 1 sibling, 2 replies; 31+ messages in thread From: Arnaud Charlet @ 2011-07-11 16:53 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: Eric Botcazou, gcc, Toon Moene > When I configure with > --enable-build-with-cxx --enable-languages=c,c++,ada > I get the appended. The problem is that the Ada code is looking for C > symbol names but the names in the .o files are mangled for C++. Right, or rather than we want to use the C compiler to compile all those files (e.g. init.c, argv.c), not the C++ compiler. Arno ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 16:53 ` Arnaud Charlet @ 2011-07-11 16:59 ` Paul Koning 2011-07-11 17:28 ` Gabriel Dos Reis 1 sibling, 0 replies; 31+ messages in thread From: Paul Koning @ 2011-07-11 16:59 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc@gcc.gnu.org List On Jul 11, 2011, at 12:53 PM, Arnaud Charlet wrote: >> When I configure with >> --enable-build-with-cxx --enable-languages=c,c++,ada >> I get the appended. The problem is that the Ada code is looking for C >> symbol names but the names in the .o files are mangled for C++. > > Right, or rather than we want to use the C compiler to compile all those > files (e.g. init.c, argv.c), not the C++ compiler. Isn't 'extern "C" ' the standard way to handle this sort of thing? paul ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 16:53 ` Arnaud Charlet 2011-07-11 16:59 ` Paul Koning @ 2011-07-11 17:28 ` Gabriel Dos Reis 1 sibling, 0 replies; 31+ messages in thread From: Gabriel Dos Reis @ 2011-07-11 17:28 UTC (permalink / raw) To: Arnaud Charlet; +Cc: Ian Lance Taylor, Eric Botcazou, gcc, Toon Moene On Mon, Jul 11, 2011 at 11:53 AM, Arnaud Charlet <charlet@adacore.com> wrote: >> When I configure with >> --enable-build-with-cxx --enable-languages=c,c++,ada >> I get the appended. The problem is that the Ada code is looking for C >> symbol names but the names in the .o files are mangled for C++. > > Right, or rather than we want to use the C compiler to compile all those > files (e.g. init.c, argv.c), not the C++ compiler. Do you want a C compiler for that, or do you in fact just need an extern "C" language specification for those symbols? I would have thought the latter. -- Gaby ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 16:47 ` Ian Lance Taylor 2011-07-11 16:53 ` Arnaud Charlet @ 2011-07-11 19:00 ` Eric Botcazou 2011-07-11 20:12 ` Ian Lance Taylor 1 sibling, 1 reply; 31+ messages in thread From: Eric Botcazou @ 2011-07-11 19:00 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gcc, Toon Moene > When I configure with > --enable-build-with-cxx --enable-languages=c,c++,ada > I get the appended. The problem is that the Ada code is looking for C > symbol names but the names in the .o files are mangled for C++. OK, this is known: a couple of tweaks to the Makefile (to use g++ instead of gcc to link) are needed and extern "C" must be added all over the place, see: http://gcc.gnu.org/ml/gcc/2009-06/msg00635.html I can post an updated patch if you want, but saying that the Ada front-end blocks the use of C++ in gcc is unfair; it is (and has always been) neutral. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 19:00 ` Eric Botcazou @ 2011-07-11 20:12 ` Ian Lance Taylor 2011-07-11 20:25 ` Eric Botcazou 0 siblings, 1 reply; 31+ messages in thread From: Ian Lance Taylor @ 2011-07-11 20:12 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc, Toon Moene Eric Botcazou <ebotcazou@adacore.com> writes: >> When I configure with >> --enable-build-with-cxx --enable-languages=c,c++,ada >> I get the appended. The problem is that the Ada code is looking for C >> symbol names but the names in the .o files are mangled for C++. > > OK, this is known: a couple of tweaks to the Makefile (to use g++ instead of > gcc to link) are needed and extern "C" must be added all over the place, see: > http://gcc.gnu.org/ml/gcc/2009-06/msg00635.html > > I can post an updated patch if you want, but saying that the Ada front-end > blocks the use of C++ in gcc is unfair; it is (and has always been) neutral. My apologies, I didn't mean to attack. I tried it, and it failed building Ada. That's all I meant. If there is an up to date patch, I'm happy to review it if it would help. But perhaps an Ada maintainer would prefer to do the review, I don't know what the usual policy is as I've never approved an Ada patch. I have a patch ready to go which would use C++ in stages 2 and 3. I can't propose that patch right now because it fails when building Ada. If we get Ada fixed, I will propose it. Ian ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 20:12 ` Ian Lance Taylor @ 2011-07-11 20:25 ` Eric Botcazou 2011-07-11 20:58 ` Ian Lance Taylor 0 siblings, 1 reply; 31+ messages in thread From: Eric Botcazou @ 2011-07-11 20:25 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gcc, Toon Moene > If there is an up to date patch, I'm happy to review it if it would > help. But perhaps an Ada maintainer would prefer to do the review, I > don't know what the usual policy is as I've never approved an Ada patch. The patch is here: http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00845.html > I have a patch ready to go which would use C++ in stages 2 and 3. I > can't propose that patch right now because it fails when building Ada. > If we get Ada fixed, I will propose it. OK, let's fix --enable-build-with-cxx with Ada. Thanks for clarifying. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 20:25 ` Eric Botcazou @ 2011-07-11 20:58 ` Ian Lance Taylor 2011-07-11 21:12 ` Eric Botcazou 2011-07-11 22:54 ` Laurent GUERBY 0 siblings, 2 replies; 31+ messages in thread From: Ian Lance Taylor @ 2011-07-11 20:58 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc, Toon Moene Eric Botcazou <ebotcazou@adacore.com> writes: >> If there is an up to date patch, I'm happy to review it if it would >> help. But perhaps an Ada maintainer would prefer to do the review, I >> don't know what the usual policy is as I've never approved an Ada patch. > > The patch is here: http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00845.html Thanks. I'm not sure that always setting LINKER=$(CXX) in gnattools/Makefile.in is correct. It seems to me that that should vary based on --enable-build-with-cxx, as is done in gcc/Makefile.in. But I don't know much about building Ada, and perhaps this is right. Otherwise the patch looks fine to me, for whatever that is worth. Ian ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 20:58 ` Ian Lance Taylor @ 2011-07-11 21:12 ` Eric Botcazou 2011-07-11 22:54 ` Laurent GUERBY 1 sibling, 0 replies; 31+ messages in thread From: Eric Botcazou @ 2011-07-11 21:12 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gcc, Toon Moene > I'm not sure that always setting LINKER=$(CXX) in gnattools/Makefile.in > is correct. It seems to me that that should vary based on > --enable-build-with-cxx, as is done in gcc/Makefile.in. But I don't > know much about building Ada, and perhaps this is right. Good catch, thanks, will fix. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 20:58 ` Ian Lance Taylor 2011-07-11 21:12 ` Eric Botcazou @ 2011-07-11 22:54 ` Laurent GUERBY 2011-07-12 6:47 ` Eric Botcazou 1 sibling, 1 reply; 31+ messages in thread From: Laurent GUERBY @ 2011-07-11 22:54 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: Eric Botcazou, gcc, Toon Moene, Paolo Bonzini On Mon, 2011-07-11 at 13:58 -0700, Ian Lance Taylor wrote: > Eric Botcazou <ebotcazou@adacore.com> writes: > > >> If there is an up to date patch, I'm happy to review it if it would > >> help. But perhaps an Ada maintainer would prefer to do the review, I > >> don't know what the usual policy is as I've never approved an Ada patch. > > > > The patch is here: http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00845.html > > Thanks. > > I'm not sure that always setting LINKER=$(CXX) in gnattools/Makefile.in > is correct. It seems to me that that should vary based on > --enable-build-with-cxx, as is done in gcc/Makefile.in. But I don't > know much about building Ada, and perhaps this is right. Hi, Paolo did suggest something like that: http://gcc.gnu.org/ml/gcc/2009-06/msg00639.html << I think you should rather do "CC=../../xgcc -B../../" \ + "CXX=../../g++ -B../../" \ "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS) $(WARN_CFLAGS)" \ and copy the setting of COMPILER and LINKER from gcc/Makefile.in into gcc/ada/gcc-interface/Makefile.in: ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@ ifneq ($(ENABLE_BUILD_WITH_CXX),yes) COMPILER = $(CC) COMPILER_FLAGS = $(CFLAGS) LINKER = $(CC) LINKER_FLAGS = $(CFLAGS) else COMPILER = $(CXX) COMPILER_FLAGS = $(CXXFLAGS) LINKER = $(CXX) LINKER_FLAGS = $(CXXFLAGS) endif Paolo >> Now I don't know if we intend to support build without CXX in the near future :). Sincerely, Laurent ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-11 22:54 ` Laurent GUERBY @ 2011-07-12 6:47 ` Eric Botcazou 2011-07-12 6:54 ` Arnaud Charlet 0 siblings, 1 reply; 31+ messages in thread From: Eric Botcazou @ 2011-07-12 6:47 UTC (permalink / raw) To: Laurent GUERBY; +Cc: Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini > Paolo did suggest something like that: > > http://gcc.gnu.org/ml/gcc/2009-06/msg00639.html > << > I think you should rather do > > "CC=../../xgcc -B../../" \ > + "CXX=../../g++ -B../../" \ > "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ > + "CXXFLAGS=$(CXXFLAGS) $(WARN_CFLAGS)" \ > > and copy the setting of COMPILER and LINKER from gcc/Makefile.in into > gcc/ada/gcc-interface/Makefile.in: > > ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@ > ifneq ($(ENABLE_BUILD_WITH_CXX),yes) > COMPILER = $(CC) > COMPILER_FLAGS = $(CFLAGS) > LINKER = $(CC) > LINKER_FLAGS = $(CFLAGS) > else > COMPILER = $(CXX) > COMPILER_FLAGS = $(CXXFLAGS) > LINKER = $(CXX) > LINKER_FLAGS = $(CXXFLAGS) > endif I'm not sure because I don't think we want to compile the C files of the Ada runtime with the C++ compiler. We want to do that only for the compiler. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 6:47 ` Eric Botcazou @ 2011-07-12 6:54 ` Arnaud Charlet 2011-07-12 7:44 ` Paolo Bonzini ` (2 more replies) 0 siblings, 3 replies; 31+ messages in thread From: Arnaud Charlet @ 2011-07-12 6:54 UTC (permalink / raw) To: Eric Botcazou Cc: Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini > I'm not sure because I don't think we want to compile the C files of the Ada > runtime with the C++ compiler. We want to do that only for the compiler. Right, we definitely don't want to use the C++ compiler for building the Ada run-time. Arno ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 6:54 ` Arnaud Charlet @ 2011-07-12 7:44 ` Paolo Bonzini 2011-07-12 7:51 ` Paolo Bonzini ` (2 more replies) 2011-07-12 8:01 ` Eric Botcazou 2011-07-12 10:57 ` Paul Koning 2 siblings, 3 replies; 31+ messages in thread From: Paolo Bonzini @ 2011-07-12 7:44 UTC (permalink / raw) To: Arnaud Charlet Cc: Eric Botcazou, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini On 07/12/2011 08:54 AM, Arnaud Charlet wrote: >> I'm not sure because I don't think we want to compile the C files of the Ada >> > runtime with the C++ compiler. We want to do that only for the compiler. > > Right, we definitely don't want to use the C++ compiler for building the > Ada run-time. But apparently they already are (when building the compiler), otherwise the patch in http://gcc.gnu.org/ml/gcc/2009-06/txt00004.txt would make no sense: Index: gcc/ada/env.c =================================================================== --- gcc/ada/env.c (revision 148953) +++ gcc/ada/env.c (working copy) @@ -29,6 +29,11 @@ * * ****************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + #ifdef IN_RTS #include "tconfig.h" #include "tsystem.h" @@ -313,3 +318,7 @@ clearenv (); #endif } + +#ifdef __cplusplus +} +#endif Perhaps it is better to always build those files with cc, perhaps not. Since there are two versions of the Ada RTL, the one in the compiler and the one in libada, my questions are: 1) Do they share any object files when not cross-compiling? 2) If not, is using C++ for the former okay? If the answers are "no" and "yes" respectively, I still think a patch like the one I suggested, where the host files in gcc/ are uniformly compiled with C++, is preferrable. You do need to force usage of a C compiler when compiling libada: Index: Makefile.in =================================================================== --- Makefile.in (revision 169877) +++ Makefile.in (working copy) @@ -2451,6 +2451,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + ENABLE_BUILD_WITH_CXX=no \ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ @@ -2459,6 +2460,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + ENABLE_BUILD_WITH_CXX=no \ ADA_INCLUDES="" \ CFLAGS="$(GNATLIBCFLAGS)" \ ADAFLAGS="$(GNATLIBFLAGS)" \ And of course extern "C" needs to be added to the headers, so that public symbols used by compiled Ada source are not mangled. However, static and private symbols need not be extern "C". Paolo ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 7:44 ` Paolo Bonzini @ 2011-07-12 7:51 ` Paolo Bonzini 2011-07-12 8:02 ` Eric Botcazou 2011-07-12 8:21 ` Arnaud Charlet 2 siblings, 0 replies; 31+ messages in thread From: Paolo Bonzini @ 2011-07-12 7:51 UTC (permalink / raw) To: gcc Cc: Eric Botcazou, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini On 07/12/2011 08:54 AM, Arnaud Charlet wrote: >> I'm not sure because I don't think we want to compile the C files of the Ada >> > runtime with the C++ compiler. We want to do that only for the compiler. > > Right, we definitely don't want to use the C++ compiler for building the > Ada run-time. But apparently they already are (when building the compiler), otherwise the patch in http://gcc.gnu.org/ml/gcc/2009-06/txt00004.txt would make no sense: Index: gcc/ada/env.c =================================================================== --- gcc/ada/env.c (revision 148953) +++ gcc/ada/env.c (working copy) @@ -29,6 +29,11 @@ * * ****************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + #ifdef IN_RTS #include "tconfig.h" #include "tsystem.h" @@ -313,3 +318,7 @@ clearenv (); #endif } + +#ifdef __cplusplus +} +#endif Perhaps it is better to always build those files with cc, perhaps not. Since there are two versions of the Ada RTL, the one in the compiler and the one in libada, my questions are: 1) Do they share any object files when not cross-compiling? 2) If not, is using C++ for the former okay? If the answers are "no" and "yes" respectively, I still think a patch like the one I suggested, where the host files in gcc/ are uniformly compiled with C++, is preferrable. You do need to force usage of a C compiler when compiling libada: Index: Makefile.in =================================================================== --- Makefile.in (revision 169877) +++ Makefile.in (working copy) @@ -2451,6 +2451,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + ENABLE_BUILD_WITH_CXX=no \ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ @@ -2459,6 +2460,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + ENABLE_BUILD_WITH_CXX=no \ ADA_INCLUDES="" \ CFLAGS="$(GNATLIBCFLAGS)" \ ADAFLAGS="$(GNATLIBFLAGS)" \ And of course extern "C" needs to be added to the headers, so that public symbols used by compiled Ada source are not mangled. However, static and private symbols need not be extern "C". Paolo ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 7:44 ` Paolo Bonzini 2011-07-12 7:51 ` Paolo Bonzini @ 2011-07-12 8:02 ` Eric Botcazou 2011-07-12 8:24 ` Paolo Bonzini 2011-07-12 8:21 ` Arnaud Charlet 2 siblings, 1 reply; 31+ messages in thread From: Eric Botcazou @ 2011-07-12 8:02 UTC (permalink / raw) To: Paolo Bonzini Cc: Arnaud Charlet, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini > Perhaps it is better to always build those files with cc, perhaps not. > Since there are two versions of the Ada RTL, the one in the compiler and > the one in libada, my questions are: > > 1) Do they share any object files when not cross-compiling? > > 2) If not, is using C++ for the former okay? There aren't really 2 versions and there aren't shared in any case. > If the answers are "no" and "yes" respectively, I still think a patch > like the one I suggested, where the host files in gcc/ are uniformly > compiled with C++, is preferrable. But your patch isn't necessary to do that, the C files are already compiled with the C++ compiler as of today; the only issue is at the linking stage. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 8:02 ` Eric Botcazou @ 2011-07-12 8:24 ` Paolo Bonzini 2011-07-12 8:44 ` Eric Botcazou 0 siblings, 1 reply; 31+ messages in thread From: Paolo Bonzini @ 2011-07-12 8:24 UTC (permalink / raw) To: Eric Botcazou Cc: Paolo Bonzini, Arnaud Charlet, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene On 07/12/2011 10:00 AM, Eric Botcazou wrote: > But your patch isn't necessary to do that, the C files are already compiled > with the C++ compiler as of today; the only issue is at the linking stage. The problem is that the patches links gnattools unconditionally with g++. It should depend on --enable-build-with-cxx instead. Paolo ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 8:24 ` Paolo Bonzini @ 2011-07-12 8:44 ` Eric Botcazou 0 siblings, 0 replies; 31+ messages in thread From: Eric Botcazou @ 2011-07-12 8:44 UTC (permalink / raw) To: Paolo Bonzini Cc: Paolo Bonzini, Arnaud Charlet, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene > The problem is that the patches links gnattools unconditionally with > g++. It should depend on --enable-build-with-cxx instead. Yes, that part was wrong, it will be dropped, we don't want to use g++ here. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 7:44 ` Paolo Bonzini 2011-07-12 7:51 ` Paolo Bonzini 2011-07-12 8:02 ` Eric Botcazou @ 2011-07-12 8:21 ` Arnaud Charlet 2 siblings, 0 replies; 31+ messages in thread From: Arnaud Charlet @ 2011-07-12 8:21 UTC (permalink / raw) To: Paolo Bonzini Cc: Eric Botcazou, Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini > But apparently they already are (when building the compiler), otherwise That's different: some parts of the run-time is used with a native compiler to bootstrap GNAT. The GNAT run-time is built separately using the target compiler (potentially different from the native compiler), so bootstrapping and building the run-time is done separately, using different compilers and different options. Arno ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 6:54 ` Arnaud Charlet 2011-07-12 7:44 ` Paolo Bonzini @ 2011-07-12 8:01 ` Eric Botcazou 2011-07-12 10:57 ` Paul Koning 2 siblings, 0 replies; 31+ messages in thread From: Eric Botcazou @ 2011-07-12 8:01 UTC (permalink / raw) To: Arnaud Charlet Cc: Laurent GUERBY, Ian Lance Taylor, gcc, Toon Moene, Paolo Bonzini > Right, we definitely don't want to use the C++ compiler for building the > Ada run-time. OK, so the only needed Makefile change is to gcc-interface/Make-lang.in: Index: ada/gcc-interface/Make-lang.in =================================================================== --- ada/gcc-interface/Make-lang.in (revision 176072) +++ ada/gcc-interface/Make-lang.in (working copy) @@ -104,7 +104,7 @@ ADA_TOOLS_FLAGS_TO_PASS=\ "GNATLINK=../../gnatlink" \ "GNATBIND=../../gnatbind" -GCC_LINK=$(CC) -static-libgcc $(LDFLAGS) +GCC_LINK=$(LINKER) $(ALL_LINKERFLAGS) -static-libgcc $(LDFLAGS) # Lists of files for various purposes. I'm not sure about the long-term interaction with -static-libgcc here, but this works currently on Linux so let's keep it for now. And this means that the initial version adds superfluous extern "C" blocks, I'm going to clean it up. -- Eric Botcazou ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 6:54 ` Arnaud Charlet 2011-07-12 7:44 ` Paolo Bonzini 2011-07-12 8:01 ` Eric Botcazou @ 2011-07-12 10:57 ` Paul Koning 2011-07-12 10:58 ` Arnaud Charlet 2 siblings, 1 reply; 31+ messages in thread From: Paul Koning @ 2011-07-12 10:57 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc@gcc.gnu.org List On Jul 12, 2011, at 2:54 AM, Arnaud Charlet wrote: >> I'm not sure because I don't think we want to compile the C files of the Ada >> runtime with the C++ compiler. We want to do that only for the compiler. > > Right, we definitely don't want to use the C++ compiler for building the > Ada run-time. Why not? If extern "C" is used correctly, the result will work just the same, and the improved type checking etc. would be an asset here just as it is elsewhere. paul ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 10:57 ` Paul Koning @ 2011-07-12 10:58 ` Arnaud Charlet 2011-07-12 11:11 ` Paul Koning 0 siblings, 1 reply; 31+ messages in thread From: Arnaud Charlet @ 2011-07-12 10:58 UTC (permalink / raw) To: Paul Koning; +Cc: gcc@gcc.gnu.org List > Why not? If extern "C" is used correctly, the result will work just the same, > and the improved type checking etc. would be an asset here just as it is > elsewhere. We don't use much C code, so the extra benefits wouldn't really be useful to us (we already get much more benefits by having most of the Ada run-time written in Ada), and having to deal with mixed C++/Ada by default in the Ada run-time can bring its own share or complexity that we shouldn't have to deal with by default. In addition, the GNAT run-time is built for many cross targets where requiring a cross C++ compiler would add lots of extra pain. Requiring a C++ native compiler for bootstrap is one thing (already an extra pain on some platforms), requiring a C++ cross compiler for building the run-time is just not an acceptable requirement. Arno ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-12 10:58 ` Arnaud Charlet @ 2011-07-12 11:11 ` Paul Koning 0 siblings, 0 replies; 31+ messages in thread From: Paul Koning @ 2011-07-12 11:11 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc@gcc.gnu.org List On Jul 12, 2011, at 6:56 AM, Arnaud Charlet wrote: >> Why not? If extern "C" is used correctly, the result will work just the same, >> and the improved type checking etc. would be an asset here just as it is >> elsewhere. > > We don't use much C code, so the extra benefits wouldn't really be useful > to us (we already get much more benefits by having most of the Ada run-time > written in Ada), and having to deal with mixed C++/Ada by default in the > Ada run-time can bring its own share or complexity that we shouldn't have > to deal with by default. > > In addition, the GNAT run-time is built for many cross targets where requiring > a cross C++ compiler would add lots of extra pain. > > Requiring a C++ native compiler for bootstrap is one thing (already an > extra pain on some platforms), requiring a C++ cross compiler for building the > run-time is just not an acceptable requirement. Thanks for the explanation, that makes perfect sense. paul ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 4:46 ` Ian Lance Taylor 2011-07-10 7:52 ` Eric Botcazou @ 2011-07-10 18:03 ` Toon Moene 2011-07-10 18:09 ` Gabriel Dos Reis 2011-07-10 21:21 ` Laurent GUERBY 1 sibling, 2 replies; 31+ messages in thread From: Toon Moene @ 2011-07-10 18:03 UTC (permalink / raw) To: Ian Lance Taylor; +Cc: gcc mailing list On 07/10/2011 06:45 AM, Ian Lance Taylor wrote: > Toon Moene<toon@moene.org> writes: >> As of a couple of months, I perform a bootstrap-with-C++ >> (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 >> UTC. >> >> I see that the build by a C++ compiler has been the subject of the GCC >> Gathering at Google: >> >> C++ style and migration crowl writing and using C++ in gcc >> >> It is not quite clear what the outcome of this discussion was. >> >> Is there still interest in daily builds like mine ? > > Yes, it's definitely useful. > > The immediate blocker to using C++ in gcc is the Ada frontend. > --enable-build-with-cxx and --enable-languages=ada do not work together. Ah, OK. Just drop me a note when a regular test including Ada starts to be useful (I probably have to skip some other front end language in favor Ada to stay within the two hour elapsed time window between two weather forecasting runs). BTW, the ultimate reason I asked was that it turned out that running an ordinary quad core PC to the max doesn't come for free. Last month I got past year's electricity bill - it turns out that I am now (16 hours of weather forecasting and 4 hours of GCC bootstrapping per day) using 3200 KWh a year - to the tune of 1100 Euros. So the question whether a run is useful is certainly relevant :-) -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 18:03 ` Toon Moene @ 2011-07-10 18:09 ` Gabriel Dos Reis 2011-07-10 21:21 ` Laurent GUERBY 1 sibling, 0 replies; 31+ messages in thread From: Gabriel Dos Reis @ 2011-07-10 18:09 UTC (permalink / raw) To: Toon Moene; +Cc: Ian Lance Taylor, gcc mailing list On Sun, Jul 10, 2011 at 1:03 PM, Toon Moene <toon@moene.org> wrote: > BTW, the ultimate reason I asked was that it turned out that running an > ordinary quad core PC to the max doesn't come for free. > > Last month I got past year's electricity bill - it turns out that I am now > (16 hours of weather forecasting and 4 hours of GCC bootstrapping per day) > using 3200 KWh a year - to the tune of 1100 Euros. Ouch! :-/ > So the question whether a run is useful is certainly relevant :-) Indeed :-) ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 18:03 ` Toon Moene 2011-07-10 18:09 ` Gabriel Dos Reis @ 2011-07-10 21:21 ` Laurent GUERBY 2011-07-11 18:31 ` Toon Moene 1 sibling, 1 reply; 31+ messages in thread From: Laurent GUERBY @ 2011-07-10 21:21 UTC (permalink / raw) To: Toon Moene; +Cc: Ian Lance Taylor, gcc mailing list On Sun, 2011-07-10 at 20:03 +0200, Toon Moene wrote: > On 07/10/2011 06:45 AM, Ian Lance Taylor wrote: > > > Toon Moene<toon@moene.org> writes: > > >> As of a couple of months, I perform a bootstrap-with-C++ > >> (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 > >> UTC. > >> > >> I see that the build by a C++ compiler has been the subject of the GCC > >> Gathering at Google: > >> > >> C++ style and migration crowl writing and using C++ in gcc > >> > >> It is not quite clear what the outcome of this discussion was. > >> > >> Is there still interest in daily builds like mine ? > > > > Yes, it's definitely useful. > > > > The immediate blocker to using C++ in gcc is the Ada frontend. > > --enable-build-with-cxx and --enable-languages=ada do not work together. > > Ah, OK. > > Just drop me a note when a regular test including Ada starts to be > useful (I probably have to skip some other front end language in favor > Ada to stay within the two hour elapsed time window between two weather > forecasting runs). > > BTW, the ultimate reason I asked was that it turned out that running an > ordinary quad core PC to the max doesn't come for free. > > Last month I got past year's electricity bill - it turns out that I am > now (16 hours of weather forecasting and 4 hours of GCC bootstrapping > per day) using 3200 KWh a year - to the tune of 1100 Euros. > > So the question whether a run is useful is certainly relevant :-) Hi, Since I pay the electricty bill of some compile farm machines I understand you here :). New generation of hardware has made significant progress on energy efficiency: my latest built PC is a Intel core i7 2600 4 cores 8 threads 3.4 GHz 4x4 GB of RAM with 40 GB SSD + 2TB HDD, 80+ gold PSU and it idles around 30W and uses 110W full CPU load. PC cost is around 800 EUR in France (19.6% VAT included). According to your data it should reduce your bill by a factor of three (365W => 110W), so it should pay itself in around a year: 720 EUR less on your yearly electricity bill, assuming you counted only your PC power consumption in your figures. And bonus nearly no noise in a case with 2 or 3 120mm fans. I haven't had a chance to test AMD A8 processors but I will do soon. Sincerely, Laurent ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: C++ bootstrap of GCC - still useful ? 2011-07-10 21:21 ` Laurent GUERBY @ 2011-07-11 18:31 ` Toon Moene 0 siblings, 0 replies; 31+ messages in thread From: Toon Moene @ 2011-07-11 18:31 UTC (permalink / raw) To: Laurent GUERBY; +Cc: Ian Lance Taylor, gcc mailing list On 07/10/2011 11:20 PM, Laurent GUERBY wrote: > On Sun, 2011-07-10 at 20:03 +0200, Toon Moene wrote: >> Last month I got past year's electricity bill - it turns out that I am >> now (16 hours of weather forecasting and 4 hours of GCC bootstrapping >> per day) using 3200 KWh a year - to the tune of 1100 Euros. >> >> So the question whether a run is useful is certainly relevant :-) > Since I pay the electricity bill of some compile farm machines > I understand you here :). > > New generation of hardware has made significant progress on energy > efficiency: my latest built PC is a Intel core i7 2600 4 cores 8 threads > 3.4 GHz 4x4 GB of RAM with 40 GB SSD + 2TB HDD, 80+ gold PSU and it > idles around 30W and uses 110W full CPU load. PC cost is around 800 EUR > in France (19.6% VAT included). > > According to your data it should reduce your bill by a factor of three > (365W => 110W), so it should pay itself in around a year: 720 EUR less > on your yearly electricity bill, assuming you counted only your PC power > consumption in your figures. And bonus nearly no noise in a case with 2 > or 3 120mm fans. > > I haven't had a chance to test AMD A8 processors but I will do soon. One of the most frustrating aspects of this is that I cannot just write an Invitation To Tender for a 1000-1200 Euro PC (I have been involved with that process for KNMI's High Performance Computer now for over 15 years). If I could do that, I would be able to: 1) Choose from several vendors. 2) Evaluate both "speed-of-execution" and "energy-efficiency" in a consistent way. 3) Evaluate the use of AMD vs Intel processors independent of the vendor of choice. 4) Get the vendor to install the Operating-System-of-choice (Debian Testing) and run my benchmarks, so that I'll be able to check their assumptions. Instead, what I am currently doing to plan the replacement of the 2007 vintage machine that runs just two feet away from me, is to: 1) Gather information about upcoming Intel and AMD CPU's. 2) Estimate when they will hit the "Home and Small Business Market". 3) Hope that such a machine will indeed be priced between 1000-1200 Euro's. 4) Hope that the vendor who delivered me the current machine will have a competitive offer (note that I want to stay with my current vendor - I yet have to see another PC vendor making a machine that's obviously geared towards teenagers storing bittorrent-downloaded movies, that actually is able to work 16 hours+ per day on *real science* at full capacity without breaking down after years of service). Sigh. -- Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news ^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2011-07-12 10:58 UTC | newest] Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-09 20:08 C++ bootstrap of GCC - still useful ? Toon Moene 2011-07-09 22:05 ` Gabriel Dos Reis 2011-07-09 22:27 ` Hargett, Matt 2011-07-10 4:46 ` Ian Lance Taylor 2011-07-10 7:52 ` Eric Botcazou 2011-07-11 16:47 ` Ian Lance Taylor 2011-07-11 16:53 ` Arnaud Charlet 2011-07-11 16:59 ` Paul Koning 2011-07-11 17:28 ` Gabriel Dos Reis 2011-07-11 19:00 ` Eric Botcazou 2011-07-11 20:12 ` Ian Lance Taylor 2011-07-11 20:25 ` Eric Botcazou 2011-07-11 20:58 ` Ian Lance Taylor 2011-07-11 21:12 ` Eric Botcazou 2011-07-11 22:54 ` Laurent GUERBY 2011-07-12 6:47 ` Eric Botcazou 2011-07-12 6:54 ` Arnaud Charlet 2011-07-12 7:44 ` Paolo Bonzini 2011-07-12 7:51 ` Paolo Bonzini 2011-07-12 8:02 ` Eric Botcazou 2011-07-12 8:24 ` Paolo Bonzini 2011-07-12 8:44 ` Eric Botcazou 2011-07-12 8:21 ` Arnaud Charlet 2011-07-12 8:01 ` Eric Botcazou 2011-07-12 10:57 ` Paul Koning 2011-07-12 10:58 ` Arnaud Charlet 2011-07-12 11:11 ` Paul Koning 2011-07-10 18:03 ` Toon Moene 2011-07-10 18:09 ` Gabriel Dos Reis 2011-07-10 21:21 ` Laurent GUERBY 2011-07-11 18:31 ` Toon Moene
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).