Changeset View
Changeset View
Standalone View
Standalone View
Makefile.libcompat
# $FreeBSD$ | # $FreeBSD$ | ||||
.if !targets(__<${_this:T}>__) | .if !targets(__<${_this:T}>__) | ||||
__<${_this:T}>__: | __<${_this:T}>__: | ||||
# Makefile for the compatibility libraries. | # Makefile for the compatibility libraries. | ||||
# - 32-bit compat libraries on MIPS, PowerPC, and AMD64. | # - 32-bit compat libraries on MIPS, PowerPC, and AMD64. | ||||
# ------------------------------------------------------------------- | # ------------------------------------------------------------------- | ||||
# 32 bit world | # 32 bit world | ||||
# Determines linker used for 32-bit compatibility | |||||
.include "Makefile.libcompat.inc1" | |||||
imp: why a separate file? | |||||
Done Inline ActionsThe alternative linker for the 32bit compat is a "hack" while LLD doesn't fully support powerpc32. So I did it in a different file to avoid mixing a "hack" with regular logic. alfredo: The alternative linker for the 32bit compat is a "hack" while LLD doesn't fully support… | |||||
Done Inline ActionsI don't think we need a separate file for this. Especially the name is confusing if it is powerpc-specific. We have plenty of hacks already in both Makefile.inc1 and Makefile.libcompat that are arch-specific. bdrewery: I don't think we need a separate file for this. Especially the name is confusing if it is… | |||||
.if ${TARGET_ARCH} == "amd64" | .if ${TARGET_ARCH} == "amd64" | ||||
.if empty(TARGET_CPUTYPE) | .if empty(TARGET_CPUTYPE) | ||||
LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 | LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 | ||||
Done Inline ActionsWhere is HOST_ARCH defined? Grep has no hits and make -V HOST_ARCH produces an empty string. imp: Where is HOST_ARCH defined? Grep has no hits and make -V HOST_ARCH produces an empty string.
| |||||
Done Inline ActionsReplaced by _HOST_ARCH. luporl: Replaced by _HOST_ARCH. | |||||
.else | .else | ||||
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} | LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} | ||||
.endif | .endif | ||||
.if ${WANT_COMPILER_TYPE} == gcc || \ | .if ${WANT_COMPILER_TYPE} == gcc || \ | ||||
(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) | (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) | ||||
.else | .else | ||||
LIB32CPUFLAGS+= -target x86_64-unknown-freebsd13.0 | LIB32CPUFLAGS+= -target x86_64-unknown-freebsd13.0 | ||||
.endif | .endif | ||||
LIB32CPUFLAGS+= -m32 | LIB32CPUFLAGS+= -m32 | ||||
LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ | LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ | ||||
MACHINE_CPU="i686 mmx sse sse2" | MACHINE_CPU="i686 mmx sse sse2" | ||||
LIB32WMAKEFLAGS= \ | LIB32WMAKEFLAGS= \ | ||||
AS="${XAS} --32" \ | AS="${XAS} --32" \ | ||||
LD="${XLD} -m elf_i386_fbsd -L${LIBCOMPATTMP}/usr/lib32" \ | LD="${LIB32LD} -m elf_i386_fbsd -L${LIBCOMPATTMP}/usr/lib32" \ | ||||
OBJCOPY="${XOBJCOPY}" | OBJCOPY="${XOBJCOPY}" | ||||
.elif ${TARGET_ARCH} == "powerpc64" | .elif ${TARGET_ARCH} == "powerpc64" | ||||
.if empty(TARGET_CPUTYPE) | .if empty(TARGET_CPUTYPE) | ||||
LIB32CPUFLAGS= -mcpu=powerpc | LIB32CPUFLAGS= -mcpu=powerpc | ||||
.else | .else | ||||
LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} | LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} | ||||
.endif | .endif | ||||
.if ${WANT_COMPILER_TYPE} == gcc || \ | |||||
(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) | |||||
LIB32CPUFLAGS+= -m32 | LIB32CPUFLAGS+= -m32 | ||||
.else | |||||
LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.0 | |||||
.if ${LIB32LD} == "ld.bfd" | |||||
LIB32CPUFLAGS+= -fuse-ld=bfd | |||||
.else | |||||
LIB32CPUFLAGS+= -fuse-ld=${LIB32LD} | |||||
.endif | |||||
.endif | |||||
LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc | LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc | ||||
LIB32WMAKEFLAGS= \ | LIB32WMAKEFLAGS= \ | ||||
LD="${XLD} -m elf32ppc_fbsd" \ | LD="${LIB32LD} -m elf32ppc_fbsd" \ | ||||
OBJCOPY="${XOBJCOPY}" | OBJCOPY="${XOBJCOPY}" | ||||
.elif ${TARGET_ARCH:Mmips64*} != "" | .elif ${TARGET_ARCH:Mmips64*} != "" | ||||
.if ${WANT_COMPILER_TYPE} == gcc || \ | .if ${WANT_COMPILER_TYPE} == gcc || \ | ||||
(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) | (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) | ||||
.if empty(TARGET_CPUTYPE) | .if empty(TARGET_CPUTYPE) | ||||
LIB32CPUFLAGS= -march=mips3 | LIB32CPUFLAGS= -march=mips3 | ||||
.else | .else | ||||
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} | LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} | ||||
.endif | .endif | ||||
.else | .else | ||||
.if ${TARGET_ARCH:Mmips64el*} != "" | .if ${TARGET_ARCH:Mmips64el*} != "" | ||||
LIB32CPUFLAGS= -target mipsel-unknown-freebsd13.0 | LIB32CPUFLAGS= -target mipsel-unknown-freebsd13.0 | ||||
.else | .else | ||||
LIB32CPUFLAGS= -target mips-unknown-freebsd13.0 | LIB32CPUFLAGS= -target mips-unknown-freebsd13.0 | ||||
.endif | .endif | ||||
.endif | .endif | ||||
LIB32CPUFLAGS+= -mabi=32 | LIB32CPUFLAGS+= -mabi=32 | ||||
LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips | LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips | ||||
.if ${TARGET_ARCH:Mmips64el*} != "" | .if ${TARGET_ARCH:Mmips64el*} != "" | ||||
LIB32WMAKEFLAGS= LD="${XLD} -m elf32ltsmip_fbsd" | LIB32WMAKEFLAGS= LD="${LIB32LD} -m elf32ltsmip_fbsd" | ||||
.else | .else | ||||
LIB32WMAKEFLAGS= LD="${XLD} -m elf32btsmip_fbsd" | LIB32WMAKEFLAGS= LD="${LIB32LD} -m elf32btsmip_fbsd" | ||||
.endif | .endif | ||||
LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}" | LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}" | ||||
.endif | .endif | ||||
LIB32WMAKEFLAGS+= NM="${XNM}" | LIB32WMAKEFLAGS+= NM="${XNM}" | ||||
LIB32CFLAGS= -DCOMPAT_32BIT | LIB32CFLAGS= -DCOMPAT_32BIT | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |
why a separate file?