From: Robert Millan <rmh@gnu.org>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Petr Salinger <Petr.Salinger@seznam.cz>,
gcc-patches@gcc.gnu.org, Richard Henderson <rth@redhat.com>,
Jan Hubicka <jh@suse.cz>, Uros Bizjak <ubizjak@gmail.com>
Subject: PING^3 [PATCH] Support for AMD64 targets running GNU/kFreeBSD
Date: Fri, 10 Jun 2011 22:04:00 -0000 [thread overview]
Message-ID: <BANLkTik8aJxh-0Vv1dQdHXjokaYME6NzCA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Please someone look at this if you have time. The patch is very small now.
2011/6/3 Robert Millan <rmh@gnu.org>:
> Actually, please consider this patch instead. It's the same but fixes a
> mistake in ld.so pathname.
>
> 2011/6/2 Robert Millan <rmh@gnu.org>:
>> Hi,
>>
>> 2011/5/21 Joseph S. Myers <joseph@codesourcery.com>:
>>> Please send a patch against *current trunk* and CC *relevant target
>>> architecture maintainers*. linux*.h headers are no longer used on
>>> non-Linux targets (since my 2011-04-28 patch - on which I CC:ed you) so
>>> this patch version is no longer appropriate. I think you'll want to make
>>> gnu-user64.h use GNU_USER_LINK_EMULATION32 and GNU_USER_LINK_EMULATION64
>>> similarly to how gnu-user.h uses GNU_USER_LINK_EMULATION.
>>
>> Thanks for the tip. Here's an update to current trunk.
>>
>> --
>> Robert Millan
>>
>
>
>
> --
> Robert Millan
>
--
Robert Millan
[-- Attachment #2: kfreebsd64.diff --]
[-- Type: text/plain, Size: 5209 bytes --]
2011-06-02 Robert Millan <rmh@gnu.org>
* config/i386/kfreebsd-gnu.h: Resync with `config/i386/linux.h'.
* config/kfreebsd-gnu.h (GNU_USER_DYNAMIC_LINKER): Resync with
`config/linux.h'.
* config/i386/kfreebsd-gnu64.h: New file.
* config.gcc (x86_64-*-kfreebsd*-gnu): Replace `i386/kfreebsd-gnu.h'
with `i386/kfreebsd-gnu64.h'.
* config/i386/linux64.h (GNU_USER_LINK_EMULATION32)
(GNU_USER_LINK_EMULATION64): New macros.
* config/i386/gnu-user64.h (LINK_SPEC): Rely on
`GNU_USER_LINK_EMULATION32' and `GNU_USER_LINK_EMULATION64' instead
of hardcoding `elf_i386' and `elf_x86_64'.
Index: gcc/config/i386/kfreebsd-gnu64.h
===================================================================
--- gcc/config/i386/kfreebsd-gnu64.h (revision 0)
+++ gcc/config/i386/kfreebsd-gnu64.h (revision 0)
@@ -0,0 +1,26 @@
+/* Definitions for AMD x86-64 running kFreeBSD-based GNU systems with ELF format
+ Copyright (C) 2011
+ Free Software Foundation, Inc.
+ Contributed by Robert Millan.
+
+This file is part of GCC.
+
+GCC 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, or (at your option)
+any later version.
+
+GCC 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 GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#define GNU_USER_LINK_EMULATION32 "elf_i386_fbsd"
+#define GNU_USER_LINK_EMULATION64 "elf_x86_64_fbsd"
+
+#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1"
Index: gcc/config/i386/kfreebsd-gnu.h
===================================================================
--- gcc/config/i386/kfreebsd-gnu.h (revision 174566)
+++ gcc/config/i386/kfreebsd-gnu.h (working copy)
@@ -1,5 +1,5 @@
/* Definitions for Intel 386 running kFreeBSD-based GNU systems with ELF format
- Copyright (C) 2004, 2007, 2011
+ Copyright (C) 2011
Free Software Foundation, Inc.
Contributed by Robert Millan.
@@ -19,11 +19,5 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#undef GNU_USER_LINK_EMULATION
#define GNU_USER_LINK_EMULATION "elf_i386_fbsd"
-
-#undef GNU_USER_DYNAMIC_LINKER32
-#define GNU_USER_DYNAMIC_LINKER32 "/lib/ld.so.1"
-
-#undef GNU_USER_DYNAMIC_LINKER64
-#define GNU_USER_DYNAMIC_LINKER64 "/lib/ld-kfreebsd-x86-64.so.1"
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
Index: gcc/config/i386/linux64.h
===================================================================
--- gcc/config/i386/linux64.h (revision 174566)
+++ gcc/config/i386/linux64.h (working copy)
@@ -24,6 +24,9 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define GNU_USER_LINK_EMULATION32 "elf_i386"
+#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
Index: gcc/config/i386/gnu-user64.h
===================================================================
--- gcc/config/i386/gnu-user64.h (revision 174566)
+++ gcc/config/i386/gnu-user64.h (working copy)
@@ -69,7 +69,8 @@
%{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
#undef LINK_SPEC
-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \
+#define LINK_SPEC "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
+ %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
%{shared:-shared} \
%{!shared: \
%{!static: \
Index: gcc/config/kfreebsd-gnu.h
===================================================================
--- gcc/config/kfreebsd-gnu.h (revision 174566)
+++ gcc/config/kfreebsd-gnu.h (working copy)
@@ -19,7 +19,6 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#undef GNU_USER_TARGET_OS_CPP_BUILTINS
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
do \
{ \
@@ -31,5 +30,6 @@
} \
while (0)
-#undef GNU_USER_DYNAMIC_LINKER
-#define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1"
+#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
+#define GNU_USER_DYNAMIC_LINKER32 GLIBC_DYNAMIC_LINKER32
+#define GNU_USER_DYNAMIC_LINKER64 GLIBC_DYNAMIC_LINKER64
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 174566)
+++ gcc/config.gcc (working copy)
@@ -1268,7 +1268,7 @@
x86_64-*-linux*)
tm_file="${tm_file} linux.h i386/linux64.h"
default_gnu_indirect_function=glibc-2011 ;;
- x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
+ x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h" ;;
x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
esac
tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
next reply other threads:[~2011-06-10 20:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 22:04 Robert Millan [this message]
2011-06-10 22:51 ` Richard Henderson
2011-06-10 23:48 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTik8aJxh-0Vv1dQdHXjokaYME6NzCA@mail.gmail.com \
--to=rmh@gnu.org \
--cc=Petr.Salinger@seznam.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=jh@suse.cz \
--cc=joseph@codesourcery.com \
--cc=rth@redhat.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).