[PATCH 1/3] gas: drop config/obj-fdpicelf.[ch]

Jan Beulich <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
It wasn't really appropriate to create these, just to inject a #define.
That's supposed to be done via a config/te-*.h.

While adding the new header to po/POTFILES.in, also add te-linux.h.
---
Are the copyright headers really necessary at the top of trivial te-*.h?
If they are needed, are the year ranges there really needed? They cause
unnecessary churn when updated at the beginning of each year.

Are config/te-*.h really necessary to add to po/POTFILES.in? If so, the
set there would need sync-ing up with what actually exists (te-pep.h, for
example, is also missing). If not, can we collectively drop them all?

--- a/gas/config/obj-fdpicelf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2012-2026 Free Software Foundation, Inc.
-
-   This file is part of GAS, the GNU Assembler.
-
-   GAS 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.
-
-   GAS 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 GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-   02110-1301, USA.  */
-
-#include "obj-elf.c"
--- a/gas/config/obj-fdpicelf.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2012-2026 Free Software Foundation, Inc.
-
-   This file is part of GAS, the GNU Assembler.
-
-   GAS 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.
-
-   GAS 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 GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-   02110-1301, USA.  */
-
-#define OBJ_FDPIC_ELF 1
-#include "obj-elf.h"
--- a/gas/config/tc-bfin.c
+++ b/gas/config/tc-bfin.c
@@ -45,7 +45,7 @@ FILE *errorf;
 /* Flags to set in the elf header */
 #define DEFAULT_FLAGS 0
 
-#ifdef OBJ_FDPIC_ELF
+#ifdef TE_LINUX_FDPIC
 # define DEFAULT_FDPIC EF_BFIN_FDPIC
 #else
 # define DEFAULT_FDPIC 0
--- /dev/null
+++ b/gas/config/te-linux-fdpic.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is part of GAS, the GNU Assembler.
+
+   GAS 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.
+
+   GAS 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 GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+#define TE_LINUX_FDPIC 1
+#include "te-linux.h"
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -172,7 +172,7 @@ case ${generic_target} in
 
   avr-*-*)				fmt=elf bfd_gas=yes ;;
 
-  bfin-*-linux-uclibc)			fmt=fdpicelf em=linux ;;
+  bfin-*-linux-uclibc)			fmt=elf em=linux-fdpic ;;
   bfin-*-uclinux*)			fmt=elf em=linux ;;
   bfin-*elf)				fmt=elf ;;
 
@@ -455,7 +455,7 @@ case ${cpu_type} in
     ;;
 esac
 case ${fmt} in
-  elf | ecoff | fdpicelf | multi | som)
+  elf | ecoff | multi | som)
     bfd_gas=yes
     ;;
 esac
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -32,8 +32,6 @@ config/obj-elf.c
 config/obj-elf.h
 config/obj-evax.c
 config/obj-evax.h
-config/obj-fdpicelf.c
-config/obj-fdpicelf.h
 config/obj-macho.c
 config/obj-macho.h
 config/obj-multi.c
@@ -202,6 +200,8 @@ config/te-hppa.h
 config/te-hppa64.h
 config/te-hppalinux64.h
 config/te-interix.h
+config/te-linux-fdpic.h
+config/te-linux.h
 config/te-lynx.h
 config/te-macos.h
 config/te-nbsd.h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.