head	1.4;
access;
symbols
	pkgsrc-2024Q2:1.3.0.16
	pkgsrc-2024Q2-base:1.3
	pkgsrc-2024Q1:1.3.0.14
	pkgsrc-2024Q1-base:1.3
	pkgsrc-2023Q4:1.3.0.12
	pkgsrc-2023Q4-base:1.3
	pkgsrc-2023Q3:1.3.0.10
	pkgsrc-2023Q3-base:1.3
	pkgsrc-2023Q2:1.3.0.8
	pkgsrc-2023Q2-base:1.3
	pkgsrc-2023Q1:1.3.0.6
	pkgsrc-2023Q1-base:1.3
	pkgsrc-2022Q4:1.3.0.4
	pkgsrc-2022Q4-base:1.3
	pkgsrc-2022Q3:1.3.0.2
	pkgsrc-2022Q3-base:1.3
	pkgsrc-2022Q2:1.2.0.2
	pkgsrc-2022Q2-base:1.2;
locks; strict;
comment	@# @;


1.4
date	2024.07.22.20.01.50;	author tnn;	state dead;
branches;
next	1.3;
commitid	LXH9Q0Lj4LEy9SiF;

1.3
date	2022.08.22.18.21.17;	author tnn;	state Exp;
branches;
next	1.2;
commitid	1WiWpHaG2SQd6UQD;

1.2
date	2022.04.14.12.55.52;	author tnn;	state Exp;
branches;
next	1.1;
commitid	iwID8AiqSacDtaAD;

1.1
date	2022.04.13.23.09.09;	author tnn;	state Exp;
branches;
next	;
commitid	Y5zJfXRFnCvPT5AD;


desc
@@


1.4
log
@cross: add xtensa-esp-elf toolchain

This comes with multilib support and replaces the chip specific
esp32/esp32s2/esp32s3 toolchains via the -mdynconfig switch.
@
text
@# $NetBSD: Makefile.common,v 1.3 2022/08/22 18:21:17 tnn Exp $

# used by cross/xtensa-esp32-elf-binutils/Makefile
# used by cross/xtensa-esp32s2-elf-binutils/Makefile
# used by cross/xtensa-esp32s3-elf-binutils/Makefile

DISTNAME=	binutils-2.35.2
PKGNAME=	${DISTNAME:C/.*binutils(-gdb)?/xtensa-${ESP32_TYPE}-elf-binutils/}
CATEGORIES=	cross
MASTER_SITES=	${MASTER_SITE_GNU:=binutils/}
EXTRACT_SUFX=	.tar.xz
# Espressif overlays
DISTFILES=	${DEFAULT_DISTFILES}
DISTFILES+=	crosstool-NG-esp-2021r2-patch3.tar.gz
SITES.crosstool-NG-esp-2021r2-patch3.tar.gz=	-https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/crosstool-NG-esp-2021r2-patch3.tar.gz

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://github.com/espressif/binutils-gdb
COMMENT=	Cross binutils for Espressif ${ESP32_TYPE:tu} bare metal environment
LICENSE=	gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3

INFO_FILES=		yes
GNU_CONFIGURE=		yes
GNU_CONFIGURE_STRICT=	no # several sub-configures know --enable-nls
USE_LIBTOOL=		yes
USE_TOOLS+=		gmake makeinfo bison
MKPIE_SUPPORTED=	no	# strange errors with libiberty. checking for fcntl.h ... no

#PATCHDIR=	${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/patches
DISTINFO_FILE=	${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/distinfo
DESCR_SRC=	${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/DESCR

OBJDIR=			../build
CONFIGURE_DIRS=		${OBJDIR}
CONFIGURE_SCRIPT=	${WRKSRC}/configure
GNU_CONFIGURE_PREFIX=	${PREFIX}/xtensa-${ESP32_TYPE}-elf

CONFIGURE_ARGS+=	--disable-werror
CONFIGURE_ARGS+=	--target=xtensa-${ESP32_TYPE}-elf
CONFIGURE_ARGS+=	--enable-multilib
CONFIGURE_ARGS+=	--disable-nls
CONFIGURE_ARGS+=	--disable-gdb

post-extract:
	${CP} -r ${WRKDIR}/overlays/xtensa_${ESP32_TYPE}/binutils/. \
	    ${WRKSRC}/.

pre-configure:
	${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
@


1.3
log
@xtensa-esp32-elf-binutils: needs bison
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.2 2022/04/14 12:55:52 tnn Exp $
@


1.2
log
@xtensa-esp32-elf-binutils: disable MKPIE
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.1 2022/04/13 23:09:09 tnn Exp $
d26 1
a26 1
USE_TOOLS+=		gmake makeinfo
@


1.1
log
@xtensa-esp32-elf-binutils: convert to Makefile.common

so we can target esp32s2 and esp32s3 in companion packages
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2022/04/13 21:02:33 tnn Exp $
d27 1
@

