Skip to content

Commit 562c8fc

Browse files
committed
8303691: Fedora based devkit build should load more packages from archive location
Reviewed-by: mbaesken, erikj
1 parent e930b63 commit 562c8fc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

make/devkit/Tools.gmk

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,7 @@ else ifeq ($(BASE_OS), Fedora)
7171
BASE_URL := http://fedora.riscv.rocks/repos-dist/$(BASE_OS_VERSION)/$(ARCH)/Packages/
7272
else
7373
DEFAULT_OS_VERSION := 27
74+
LATEST_ARCHIVED_OS_VERSION := 35
7475
ifeq ($(BASE_OS_VERSION), )
7576
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
7677
endif
@@ -79,11 +80,11 @@ else ifeq ($(BASE_OS), Fedora)
7980
else
8081
FEDORA_TYPE := fedora/linux
8182
endif
82-
ARCHIVED := $(shell [ $(BASE_OS_VERSION) -lt $(DEFAULT_OS_VERSION) ] && echo true)
83-
ifeq ($(ARCHIVED),true)
84-
BASE_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
85-
else
83+
NOT_ARCHIVED := $(shell [ $(BASE_OS_VERSION) -gt $(LATEST_ARCHIVED_OS_VERSION) ] && echo true)
84+
ifeq ($(NOT_ARCHIVED),true)
8685
BASE_URL := https://dl.fedoraproject.org/pub/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
86+
else
87+
BASE_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
8788
endif
8889
endif
8990
LINUX_VERSION := Fedora_$(BASE_OS_VERSION)
@@ -449,7 +450,7 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
449450
$(PATHPRE) $(ENVS) CFLAGS="-O2 $(CFLAGS)" \
450451
$(BINUTILS_CFG) \
451452
$(CONFIG) \
452-
$(LINKER_CONFIG) \
453+
$(LINKER_CONFIG) \
453454
--with-sysroot=$(SYSROOT) \
454455
--disable-nls \
455456
--program-prefix=$(TARGET)- \

0 commit comments

Comments
 (0)