@@ -195,6 +195,10 @@ MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
195
195
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
196
196
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
197
197
GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
198
+ ifneq (,$(annobin_ver))
199
+ ANNOBIN := https://nickc.fedorapeople.org/$(annobin_ver).tar.xz
200
+ gcc_ver_only := $(patsubst gcc-%,%,$(gcc_ver))
201
+ endif
198
202
199
203
# RPMs used by all BASE_OS
200
204
RPM_LIST := \
@@ -280,7 +284,7 @@ define Download
280
284
endef
281
285
282
286
# Download and unpack all source packages
283
- $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
287
+ $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB $(if $(annobin_ver),ANNOBIN) ,$(eval $(call Download,$(p))))
284
288
285
289
##########################################################################################
286
290
# Unpack RPMS
@@ -360,7 +364,7 @@ endif
360
364
##########################################################################################
361
365
362
366
# Define marker files for each source package to be compiled
363
- $(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
367
+ $(foreach t,binutils mpfr gmp mpc gcc ccache gdb $(if $(annobin_ver),annobin) ,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
364
368
365
369
##########################################################################################
366
370
@@ -432,6 +436,7 @@ $(gcc) \
432
436
$(mpfr) \
433
437
$(mpc) \
434
438
$(bfdmakes) \
439
+ $(if $(annobin_ver),$(annobin)) \
435
440
$(ccache) : ENVS += $(TOOLS)
436
441
437
442
# libdir to work around hateful bfd stuff installing into wrong dirs...
@@ -521,6 +526,28 @@ $(BUILDDIR)/$(mpc_ver)/Makefile \
521
526
) 2>&1 | tee $(@D)/log.config
522
527
@echo 'done'
523
528
529
+ ifneq (,$(annobin_ver))
530
+ $(BUILDDIR)/$(annobin_ver)/Makefile \
531
+ : $(ANNOBIN_CFG)
532
+ $(info Configuring $@. Log in $(@D)/log.config)
533
+ @mkdir -p $(@D)
534
+ ( \
535
+ cd $(@D) ; \
536
+ $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS) -I$(PREFIX)/include" CXXFLAGS="$(CFLAGS) -I$(PREFIX)/include" \
537
+ $(ANNOBIN_CFG) \
538
+ $(CONFIG) \
539
+ --with-gcc-plugin-dir=$(PREFIX)/lib/gcc/$(TARGET)/$(gcc_ver_only)/plugin \
540
+ --without-annocheck \
541
+ --without-tests \
542
+ --without-docs \
543
+ --disable-rpath \
544
+ --without-debuginfod \
545
+ --without-clang-plugin \
546
+ --without-llvm-plugin \
547
+ ) > $(@D)/log.config 2>&1
548
+ @echo 'done'
549
+ endif
550
+
524
551
# Only valid if glibc target -> linux
525
552
# proper destructor handling for c++
526
553
ifneq (,$(findstring linux,$(TARGET)))
@@ -575,6 +602,10 @@ $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
575
602
$(mpfr) : $(gmp)
576
603
$(mpc) : $(gmp) $(mpfr)
577
604
605
+ ifneq (,$(annobin_ver))
606
+ $(annobin) : $(gcc) $(gmp)
607
+ endif
608
+
578
609
################################################################################
579
610
# Build gdb but only where host and target match
580
611
ifeq ($(HOST), $(TARGET))
@@ -718,10 +749,13 @@ libs : $(libs)
718
749
sysroot : rpms libs
719
750
gcc : sysroot $(gcc) $(gccpatch)
720
751
gdb : $(gdb)
752
+ ifneq (,$(annobin_ver))
753
+ annobin : $(annobin)
754
+ endif
721
755
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS) \
722
- $(THESE_MAKEFILES) gdb
756
+ $(THESE_MAKEFILES) gdb $(if $(annobin_ver),annobin)
723
757
724
758
# this is only built for host. so separate.
725
759
ccache : $(ccache)
726
760
727
- .PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
761
+ .PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot $(if $(annobin_ver),annobin)
0 commit comments