darling-gdb/gold/configure.tgt
Ian Lance Taylor 3695968186 2009-03-23 Ian Lance Taylor <iant@google.com>
* freebsd.h: New file.
	* i386.cc: Include "freebsd.h".
	(Target_i386): Derive from Target_freebsd rather than
	Sized_target.
	(Target_selector_i386): Derive from Target_selector_freebsd rather
	than Target_selector.
	* x86_64.cc: Include "freebsd.h".
	(Target_x86_64): Derive from Target_freebsd rather than
	Sized_target.
	(Target_selector_x86_64): Derive from Target_selector_freebsd
	rather than Target_selector.
	* target.h (class Target): Add adjust_elf_header and
	do_adjust_elf_header.
	* output.cc (Output_file_header:: do_sized_write): Call target
	adjust_elf_header routine.
	* configure.tgt: Set targ_osabi.
	* configure.ac: Define GOLD_DEFAULT_OSABI.
	* parameters.cc (Parameters::default_target): Pass
	GOLD_DEFAULT_OSABI to select_target.
	* target-select.h (class Target_selector): Make instantiate_target
	protected rather than private.
	* Makefile.am (HFILES): Add freebsd.h.
	* configure, Makefile.in, config.in: Rebuild.
2009-03-24 00:31:29 +00:00

111 lines
2.9 KiB
Bash

# configure.tgt -- target configuration for gold -*- sh -*-
# Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# Written by Ian Lance Taylor <iant@google.com>.
# This file is part of gold.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
# This script handles target configuration for gold. This is shell
# code invoked by the autoconf generated configure script. Putting
# this in a separate file lets us skip running autoconf when modifying
# target specific information.
# This file switches on the shell variable ${targ}, which is a
# canonicalized GNU configuration triplet. It sets the following
# shell variables:
# targ_obj object file to include in the link, with no extension
# targ_extra_obj extra object file to include
# targ_machine ELF machine code for this target
# targ_size size of this target--32 or 64
# targ_extra_size extra targ_size setting for the target
# targ_big_endian whether the target is big-endian--true or false
# targ_extra_big_endian extra targ_big_endian setting for the target
# targ_osabi EI_OSABI value
# If the target is not recognized targ_obj is set to "UNKNOWN".
targ_extra_obj=
targ_machine=
targ_size=
targ_extra_size=
targ_big_endian=
targ_extra_big_endian=
targ_osabi=ELFOSABI_NONE
case "$targ" in
i?86-*)
targ_obj=i386
targ_machine=EM_386
targ_size=32
targ_big_endian=false
case "$targ" in
i?86-*-freebsd*)
targ_osabi=ELFOSABI_FREEBSD
;;
esac
;;
x86_64*)
targ_obj=x86_64
targ_extra_obj=i386
targ_machine=EM_X86_64
targ_size=64
targ_extra_size=32
targ_big_endian=false
case "$targ" in
x86_64-*-freebsd*)
targ_osabi=ELFOSABI_FREEBSD
;;
esac
;;
sparc-*)
targ_obj=sparc
targ_machine=EM_SPARC
targ_size=32
targ_extra_size=64
targ_big_endian=true
targ_extra_big_endian=false
;;
sparc64-*)
targ_obj=sparc
targ_machine=EM_SPARCV9
targ_size=64
targ_extra_size=32
targ_big_endian=true
targ_extra_big_endian=false
;;
powerpc-*)
targ_obj=powerpc
targ_machine=EM_PPC
targ_size=32
targ_extra_size=64
targ_big_endian=true
targ_extra_big_endian=false
;;
powerpc64-*)
targ_obj=powerpc
targ_machine=EM_PPC64
targ_size=64
targ_extra_size=32
targ_big_endian=true
targ_extra_big_endian=false
;;
*)
targ_obj=UNKNOWN
;;
esac