--- gcc/config/pa/pa-hpux.h 2018/04/24 18:23:34 1.1.1.3 +++ gcc/config/pa/pa-hpux.h 2018/04/24 18:31:15 1.1.1.4 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for HP-UX. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #ifndef TARGET_DEFAULT #define TARGET_DEFAULT 0 @@ -36,14 +37,16 @@ the Free Software Foundation, 675 Mass A #define DEFAULT_GDB_EXTENSIONS 0 /* Like the default, except no -lg. */ -#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}" +#undef LIB_SPEC +#define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D_HPUX_SOURCE -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa)" #undef LINK_SPEC -#define LINK_SPEC "-u main %{static: -a archive}%{g*: -a archive}" +#define LINK_SPEC \ + "%{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" -/* hpux8 and later have C++ compatable include files, so do not +/* hpux8 and later have C++ compatible include files, so do not pretend they are `extern "C"'. */ #define NO_IMPLICIT_EXTERN_C