mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Make crunchide(1) a cross-tool; needed for cross-arch "make release".
Note that a.out is only supported for the non-cross i386 case.
This commit is contained in:
parent
3a347a6e4e
commit
64b06e7897
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95781
@ -646,7 +646,8 @@ _xlint= usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint
|
||||
|
||||
cross-tools:
|
||||
.for _tool in ${_btxld} ${_elf2exe} \
|
||||
gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc ${_xlint}
|
||||
gnu/usr.bin/binutils usr.bin/objformat usr.sbin/crunch/crunchide \
|
||||
gnu/usr.bin/cc ${_xlint}
|
||||
cd ${.CURDIR}/${_tool}; \
|
||||
${MAKE} obj; \
|
||||
${MAKE} depend; \
|
||||
|
@ -3,8 +3,10 @@
|
||||
PROG= crunchide
|
||||
SRCS= crunchide.c exec_elf32.c exec_elf64.c
|
||||
|
||||
.if ${MACHINE_ARCH} == i386
|
||||
TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
.if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386
|
||||
SRCS+= exec_aout.c
|
||||
.endif
|
||||
CFLAGS+=-Darch_${TARGET_ARCH}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -208,7 +208,7 @@ struct {
|
||||
int (*check)(int, const char *); /* 1 if match, zero if not */
|
||||
int (*hide)(int, const char *); /* non-zero if error */
|
||||
} exec_formats[] = {
|
||||
#ifdef __i386__
|
||||
#if defined(__i386__) && defined(arch_i386)
|
||||
#ifdef NLIST_AOUT
|
||||
{ "a.out", check_aout, hide_aout, },
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: exec_aout.c,v 1.6 1997/08/02 21:30:17 perry Exp $");
|
||||
__FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
@ -56,7 +57,7 @@ struct nlist *symbase;
|
||||
#define IS_GLOBAL_DEFINED(sp) \
|
||||
(((sp)->n_type & N_EXT) && ((sp)->n_type & N_TYPE) != N_UNDF)
|
||||
|
||||
#ifdef __sparc
|
||||
#ifdef arch_sparc
|
||||
/* is the relocation entry dependent on a symbol? */
|
||||
#define IS_SYMBOL_RELOC(rp) \
|
||||
((rp)->r_extern || \
|
||||
|
@ -55,7 +55,13 @@ static const char rcsid[] =
|
||||
#if (defined(NLIST_ELF32) && (ELFSIZE == 32)) || \
|
||||
(defined(NLIST_ELF64) && (ELFSIZE == 64))
|
||||
|
||||
#include <machine/elf.h>
|
||||
#define __ELF_WORD_SIZE ELFSIZE
|
||||
#if (ELFSIZE == 32)
|
||||
#include <sys/elf32.h>
|
||||
#elif (ELFSIZE == 64)
|
||||
#include <sys/elf64.h>
|
||||
#endif
|
||||
#include <sys/elf_generic.h>
|
||||
|
||||
#define CONCAT(x,y) __CONCAT(x,y)
|
||||
#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* $NetBSD: extern.h,v 1.5 1998/05/06 13:16:57 mycroft Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -30,14 +31,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __alpha__
|
||||
#ifdef arch_alpha
|
||||
#define NLIST_ECOFF
|
||||
#define NLIST_ELF64
|
||||
#else
|
||||
#ifdef __mips__
|
||||
#ifdef arch_mips
|
||||
#define NLIST_ELF32
|
||||
#else
|
||||
#ifdef __powerpc__
|
||||
#ifdef arch_powerpc
|
||||
#define NLIST_ELF32
|
||||
#else
|
||||
#define NLIST_AOUT
|
||||
|
Loading…
Reference in New Issue
Block a user