Jeff Johnston [Wed, 2 Jun 2004 19:22:14 +0000 (19:22 +0000)]
2004-06-02 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions,
reset digit flags appropriately after we have discovered "0x".
* libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
Paolo Bonzini [Tue, 1 Jun 2004 07:42:22 +0000 (07:42 +0000)]
2004-06-01 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (all.normal): Rename to all.
(all): Replace with a rule to pick the default
target from configure.
(all-gcc, configure-gcc): Use conditionals to
do nothing when toplevel bootstrap is going on.
(GCC directory bootstrap) [gcc-bootstrap]: Disable.
(Toplevel bootstrap) [gcc-no-bootstrap]: Disable.
* configure.in: Support --enable-bootstrap.
Pierre Humblet [Mon, 31 May 2004 02:20:39 +0000 (02:20 +0000)]
2004-05-30 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (mount_info::add_item): Make sure native path has drive
or UNC form. Call normalize_xxx_path instead of [back]slashify.
Remove test for double slashes. Reorganize to always debug_print.
Joern Rennecke [Fri, 28 May 2004 12:32:08 +0000 (12:32 +0000)]
2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
bfd:
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* archures.c: Add bfd_mach_sh3_nommu .
* bfd-in2.h: Regenerate.
* cpu-sh.c: Add sh3-nommu architecture.
(bfd_to_arch_table): Create new table.
(sh_get_arch_from_bfd_mach): Create new function.
(sh_get_arch_up_from_bfd_mach): Create new function.
(sh_merge_bfd_arch): Create new function.
* elf32-sh.c (sh_ef_bfd_table): Add table.
(sh_elf_check_relocs): Replace switch statement with
use of sh_ef_bfd_table .
(sh_elf_get_flags_from_mach): Add new function.
(sh_find_elf_flags): Likewise.
(sh_elf_copy_private_data): Replace most of non-elf contents
with a call to sh_merge_bfd_arch() .
gas:
* Makefile.am: Regenerate dependecies.
* Makefile.in: Regenerate.
* config/tc-sh.c (valid_arch): Make unsigned.
(preset_target_arch): Likewise.
(md_begin): Use new architecture flags system.
(get_specific): Likewise.
(assemble_ppi): Likewise.
(md_assemble): Likewise. Also fix error check for bad opcodes.
(md_parse_option): Likewise. Also generate -isa values according
to the table in bfd/cpu-sh.c instead of just constants. Also
allow <arch>-up ISA variants.
(sh_elf_final_processing): Replace if-else chain with a call to
sh_find_elf_flags().
* testsuite/gas/sh/arch: New directory.
* testsuite/gas/sh/arch/arch.exp: New test script.
* testsuite/gas/sh/arch/arch_expected.txt: New file.
* testsuite/gas/sh/arch/sh.s: New file.
* testsuite/gas/sh/arch/sh2.s: New file.
* testsuite/gas/sh/arch/sh-dsp.s: New file.
* testsuite/gas/sh/arch/sh2e.s: New file.
* testsuite/gas/sh/arch/sh3-nommu.s: New file.
* testsuite/gas/sh/arch/sh3.s: New file.
* testsuite/gas/sh/arch/sh3-dsp.s: New file.
* testsuite/gas/sh/arch/sh3e.s: New file.
* testsuite/gas/sh/arch/sh4-nommu-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4.s: New file.
* testsuite/gas/sh/arch/sh4a-nofpu.s: New file.
* testsuite/gas/sh/arch/sh4al-dsp.s: New file.
* testsuite/gas/sh/arch/sh4a.s: New file.
opcodes:
* sh-dis.c (target_arch): Make unsigned.
(print_insn_sh): Replace (most of) switch with a call to
sh_get_arch_from_bfd_mach(). Also use new architecture flags system.
* sh-opc.h: Redefine architecture flags values.
Add sh3-nommu architecture.
Reorganise <arch>_up macros so they make more visual sense.
(SH_MERGE_ARCH_SET): Define new macro.
(SH_VALID_BASE_ARCH_SET): Likewise.
(SH_VALID_MMU_ARCH_SET): Likewise.
(SH_VALID_CO_ARCH_SET): Likewise.
(SH_VALID_ARCH_SET): Likewise.
(SH_MERGE_ARCH_SET_VALID): Likewise.
(SH_ARCH_SET_HAS_FPU): Likewise.
(SH_ARCH_SET_HAS_DSP): Likewise.
(SH_ARCH_UNKNOWN_ARCH): Likewise.
(sh_get_arch_from_bfd_mach): Add prototype.
(sh_get_arch_up_from_bfd_mach): Likewise.
(sh_get_bfd_mach_from_arch_set): Likewise.
(sh_merge_bfd_arc): Likewise.
ld:
* testsuite/ld-sh/arch/arch.exp: New test script.
* testsuite/ld-sh/arch/arch_expected.txt: New file.
* testsuite/ld-sh/arch/sh.s: New file.
* testsuite/ld-sh/arch/sh2.s: New file.
* testsuite/ld-sh/arch/sh-dsp.s: New file.
* testsuite/ld-sh/arch/sh2e.s: New file.
* testsuite/ld-sh/arch/sh3-nommu.s: New file.
* testsuite/ld-sh/arch/sh3.s: New file.
* testsuite/ld-sh/arch/sh3-dsp.s: New file.
* testsuite/ld-sh/arch/sh3e.s: New file.
* testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4.s: New file.
* testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
* testsuite/ld-sh/arch/sh4al-dsp.s: New file.
* testsuite/ld-sh/arch/sh4a.s: New file.
Jeff Johnston [Wed, 26 May 2004 00:19:14 +0000 (00:19 +0000)]
2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* newlib.hin: (_WANT_IO_POS_ARGS): New define.
(_WANT_IO_LONG_LONG): Ditto.
(_WANT_IO_LONG_DOUBLE): Ditto.
* configure.in: Add new configuration options
--enable-newlib-io-long-long and --enable-newlib-io-long-double
which tie to new defines in newlib.hin.
* configure: Regenerated.
* configure.host: Add checks for new configuration options. Also
fix up check for --enable-newlib-io-pos-args so configuration
option will override any default for a given platform.
Remove defining compiler flags for the _WANT_IO* options.
* libc/stdio/vfprintf.c: Change to use new newlib.hin defines
instead of looking for old compiler flags.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vfieeefp.h: Ditto.
* libc/machine/powerpc/vfprintf.c: Ditto.
* libc/machine/powerpc/vfscanf.c: Ditto.
DJ Delorie [Tue, 25 May 2004 20:36:50 +0000 (20:36 +0000)]
* Makefile.tpl (BUILD_EXPORTS, HOST_EXPORTS, GCC_HOST_EXPORTS)
(STAGE_HOST_EXPORTS, BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS)
(NORMAL_TARGET_EXPORTS): New macros. Use them in all the recursive
targets.
* Makefile.in: Regenerate.
Paolo Bonzini [Fri, 21 May 2004 19:08:54 +0000 (19:08 +0000)]
2004-05-21 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl: Whenever a recursive target is defined, wrap
it in a special @if/@endif block, and prepare its maybe
dependency in the @if/@endif block
* configure.in: Instead of writing maybe dependencies, remove
the @if/@endif statements, and remove the @if/@endif blocks
that remain.
* configure: Regenerate.
* Makefile.in: Regenerate.
* tty.cc (tty_list::allocate_tty): Leave tty_mutex armed on successful return
from !with_console
* fhandler_tty.cc (fhandler_pty_master::open): Release tty_mutex here after all
initialization is done.
Change the name "title_mutex" to "tty_mutex" throughout.
* tty.h (tty_list::allocate_tty): Turn argument into a boolean.
* tty.cc (tty_list::init): Protect entire allocation operation with tty_mutex
(formerly title_mutex) to protect against allocation races.
Corinna Vinschen [Sun, 16 May 2004 15:38:03 +0000 (15:38 +0000)]
* fhandler_socket.cc (fhandler_socket::recvfrom): Use original flags
value in each WSARecvFrom call.
(fhandler_socket::recvmsg): Ditto. Reformat slightly.
* cygthread.cc (cygthread::is): Eliminate.
* cygthread.h (cygthread::is): Eliminate declaratin.
* fhandler_console.cc (fhandler_console::read): Only wait for signal_arrived in
the main thread.
* fhandler_socket.cc: Include new "wininfo.h".
(fhandler_socket::ioctl): Use 'winmsg' rather than 'gethwnd()'.
* sync.cc (muto::grab): Define new function.
(muto::acquire): Use tls pointer rather than tid.
(muto::acquired): Ditto.
(muto::reset): Delete.
(muto::release): Ditto. Also implement "close on last release".
* sync.h (muto::tid): Delete.
(muto::tls): New field.
(muto::ismine): Delete.
(muto::owner): Delete.
(muto::unstable): Delete.
(muto::reset): Delete.
(muto::upforgrabs): New method.
(muto::grab): Ditto.
(new_muto_name): New define.
* wininfo.h: New file.
(wininfo): New class.
* window.cc: Rework throughout to use winfo class for controlling invisible
window operation.
(gethwnd): Delete definition.
* winsup.h (gethwnd): Delete declaration.
* cygheap.h: Remove some parameter names from declarations throughout.
(cygheap::set): Reflect changes in declaration for arguments and return value
from previous checkin.
* cygheap.h (cwdstuff::set): Modify return value and arguments.
* path.cc (chdir): Specify PC_POSIX. Do not call SetCurrentDirectory. Set
posix_cwd in a way that does not break find.exe. Change call to cwd.set.
(cwdstuff::get_initial): Do not call GetCurrentDirectory here.
(cwdstuff::set): Call SetCurrentDirectory and GetCurrentDirectory as needed.
Corinna Vinschen [Wed, 12 May 2004 12:28:59 +0000 (12:28 +0000)]
* cygheap.h (struct init_cygheap): Add mt_h member.
* fhandler_tape.cc (mt_h): Drop in favor of cygheap based handle.
(mtinfo_init): Use cygheap->mt_h handle. Protect it.
Pierre Humblet [Wed, 12 May 2004 01:44:11 +0000 (01:44 +0000)]
2004-05-12 Pierre Humblet <pierre.humblet@ieee.org>
* tty.h: Remove the %d or %x from all cygtty strings.
(tty::open_output_mutex): Only declare.
(tty::open_input_mutex): Ditto.
(tty::open_mutex): New definition.
* fhandlet_tty.cc (fhandler_tty_slave::open): Declare buf with
size CYG_MAX_PATH and replace __small_printf calls by shared_name.
* tty.cc (tty::create_inuse): Ditto.
(tty::get_event): Ditto.
(tty::common_init): Ditto.
(tty::open_output_mutex): New method definition.
(tty::open_input_mutex): Ditto.
(tty::open_mutex): New method.
Jakub Jelinek [Tue, 11 May 2004 17:08:38 +0000 (17:08 +0000)]
bfd/
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
into .dynsym if elf_section_data (sec)->dynindx <= 0.
Adjust counting of last_local.
(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
created by the linker nor !SHF_ALLOC.
* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
DT_PLTGOT to the start of the .got.plt section instead of the
.got output section. Set sh_entsize for .got section in addition
to .got.plt.
(elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
is at sgot->output_section->vma.
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
DT_PLTGOT to the start of the .got.plt section instead of the
.got output section.
(elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
is at sgot->output_section->vma. Set sh_entsize for .got section
in addition to .got.plt.
* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
(bfd_section_from_phdr): Likewise.
(map_sections_to_segments): Likewise.
(assign_file_positions_for_segments): Likewise.
(get_program_header_size): Likewise.
* elflink.c (bfd_elf_size_dynamic_sections): Set
elf_tdata (output_bfd)->relro from info->relro.
* elf-bfd.h (struct elf_obj_tdata): Add relro field.
include/
* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
relro_end fields.
* elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
(PT_GNU_RELRO): Define.
binutils/
* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
ld/
* genscripts.sh: Generate -z combreloc -z now -z relro scripts
for binaries, -shared and -pie.
* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
(OTHER_RELRO_SECTIONS): ... this.
* ldlex.l (DATA_SEGMENT_RELRO_END): Add.
* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
-z relro and -z norelro.
(gld${EMULATION_NAME}_list_options): Add it to usage.
(gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
-z relro scripts when appropriate.
* scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
Create separate .got.plt section if SEPARATE_GOTPLT.
Move sections which are only written during relocation handling
to the beginning of RW segment. If NO_SMALL_DATA, move .got
before .data. Add DATA_SEGMENT_RELRO_END directive.
Include OTHER_RELRO_SECTIONS.
* ldgram.y (DATA_SEGMENT_RELRO_END): Add.
* ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
(fold_unary): Likewise.
(fold_binary): Handle -z relro.
* ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
exp_dataseg_relro_adjust phases. Add relro_end field.
* ldmain.c (main): Initialize link_info.relro to FALSE.
* ldlang.c (lang_size_sections): Handle -z relro.
ld/testsuite/
* ld-i386/tlspic.rd: Adjust for section reordering changes
and removal of unneeded STT_SECTION symbols from .dynsym.
* ld-i386/tlspic.dd: Likewise.
* ld-i386/tlspic.sd: Likewise.
* ld-i386/tlsbin.rd: Likewise.
* ld-i386/tlsbinpic.s: Likewise.
* ld-i386/tlsbin.dd: Likewise.
* ld-i386/tlsbin.sd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlsnopic1.s: Likewise.
* ld-i386/combreloc.d: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlspic.sd: Likewise.
* ld-x86-64/tlsbin.sd: Likewise.
* ld-x86-64/tlspic.td: Likewise.
* ld-x86-64/tlsbin.td: Likewise.
* ld-x86-64/tlsbin.rd: Likewise.
* ld-s390/tlspic1.s: Likewise.
* ld-s390/tlsbinpic.s: Likewise.
* ld-s390/tlspic.rd: Likewise.
* ld-s390/tlsbin.rd: Likewise.
* ld-s390/tlspic.dd: Likewise.
* ld-s390/tlsbin.dd: Likewise.
* ld-s390/tlsbin.sd: Likewise.
* ld-s390/tlsbin.td: Likewise.
* ld-s390/tlspic.sd: Likewise.
* ld-s390/tlspic.td: Likewise.
* ld-s390/tlspic1_64.s: Likewise.
* ld-s390/tlsbinpic_64.s: Likewise.
* ld-s390/tlspic_64.rd: Likewise.
* ld-s390/tlsbin_64.rd: Likewise.
* ld-s390/tlspic_64.dd: Likewise.
* ld-s390/tlsbin_64.dd: Likewise.
* ld-s390/tlspic_64.sd: Likewise.
* ld-s390/tlspic_64.td: Likewise.
* ld-s390/tlsbin_64.td: Likewise.
* ld-s390/tlsbin_64.sd: Likewise.
* ld-powerpc/tlsexe32.r: Likewise.
* ld-powerpc/tlsso32.r: Likewise.
* ld-powerpc/tlsso32.d: Likewise.
* ld-powerpc/tlsso32.g: Likewise.
* ld-powerpc/tlsso32.t: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-ia64/tlspic.rd: Likewise.
* ld-ia64/tlspic.dd: Likewise.
* ld-ia64/tlspic.sd: Likewise.
* ld-ia64/tlspic.td: Likewise.
* ld-ia64/tlsbin.rd: Likewise.
* ld-ia64/tlsbin.sd: Likewise.
* ld-ia64/tlsbin.td: Likewise.
* ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x.
* ld-shared/shared.exp: Likewise.
Corinna Vinschen [Tue, 11 May 2004 15:39:50 +0000 (15:39 +0000)]
* fhandler.cc (fhandler_base::open): Set file attributes to correct
value when creating files.
* path.h (class path_conv): Add write accessor for file_attributes.
Corinna Vinschen [Mon, 10 May 2004 15:21:01 +0000 (15:21 +0000)]
* fhandler.h (class fhandler_socket): Add "owner" status flag.
* fhandler_socket.cc (wait): Take flag parameter to take FD_OOB into
account. Don't wait infinitely.
(fhandler_socket::recvfrom): Also wait for FD_OOB if socket owner.
(fhandler_socket::recvmsg): Ditto.
(fhandler_socket::sendto): Ditto.
(fhandler_socket::sendmsg): Ditto.
(fhandler_socket::fcntl): Set owner status flag if F_SETOWN with own
pid is called.
* syscalls.cc: Include environ.h.
(chroot): Set errno in case of path error. Call getwinenv.
* environ.cc: Remove the NO_COPY attribute of conv_envvars.
* fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Move delete of
bigwavebuffer_ so that it is always cleaned, also in child processes.
(fhandler_dev_dsp::Audio_in::stop): Ditto.
(fhandler_dev_dsp::close): Stop audio play immediately in case of
abnormal exit.
* thread.cc (pthread::create): Move postcreate call to avoid a potential race.
(pthread::cancelable_wait): Don't allow signal interrupt unless main thread.
Pierre Humblet [Thu, 6 May 2004 16:26:10 +0000 (16:26 +0000)]
2004-05-06 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (path_conv::check): Strip trailing dots and spaces and
return error if the final component had only dots and spaces.
(normalize_posix_path): Revert 2004-04-30.
(chdir): Do not check for trailing spaces. Do not set native_dir
to c:\ for virtual devices. Pass only native_dir to cwd.set.
(cwdstuff::set): Assume posix_cwd is already normalized.
* path.cc (normalize_win32_path): Detect components with only dots. Remove a
final . if it follows '\\'.
(mount_info::conv_to_win32_path): Only backslashify the path when no mount is
found.
(chdir): Do not look for components with only dots.
DJ Delorie [Tue, 27 Apr 2004 18:25:01 +0000 (18:25 +0000)]
merge from gcc:
2004-04-27 Paolo Bonzini <bonzini@gnu.org>
Revert:
2004-04-26 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (flags_to_pass): Remove *dir variables that
are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
as well as prefix and exec_prefix.
* Makefile.in: Regenerate.
2004-04-26 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (host_modules): Mark with the bootstrap
flag packages on which gcc depends.
* Makefile.tpl (all-bootstrap): Use it.
* Makefile.in: Regenerate.
2004-04-26 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (flags_to_pass): Remove *dir variables that
are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS,
as well as prefix and exec_prefix.
* Makefile.in: Regenerate.
2004-04-26 Paolo Bonzini <bonzini@gnu.org>
* configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL.
* configure: Regenerate.
* config/acx.m4: Mutuate ACX_PROG_CMP_IGNORE_INITIAL from gcc.
* gcc/Makefile.tpl (compare): Use the result of the test.
* gcc/Makefile.in: Regenerate.
2004-04-23 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (all-stage1-gcc, all-stage2-gcc, all-stage3-gcc):
Always relocate gcc and prev-gcc to the original names, even
if the build fails.
(new-cleanstrap, new-restage1, new-restage2, new-restage3):
New targets.