As we discussed in the last meeting, we reset the ports tree and began from scratch, even though this change involves porting all the packages. Starting small and growing gradually, this approach will reduce build times and consequently lower energy consumption in a world affected by climate change. We will add new ports as users needs arise; ok h3artbl33d@

This commit is contained in:
purplerain 2024-05-26 03:08:12 +00:00
parent 83a0aaf92c
commit 9a3af55370
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
59377 changed files with 98673 additions and 4712155 deletions

View file

@ -1,4 +1,3 @@
- enable retpoline by default
- enable PIE by default.
- arm64 and riscv64 can now do --execute-only by default
- enable --exec-only as default on AMD64
@ -35,7 +34,7 @@ Index: lld/ELF/Driver.cpp
if (config->singleRoRx && !script->hasSectionsCommand)
error("-execute-only and -no-rosegment cannot be used together");
@@ -451,10 +462,12 @@ static bool isKnownZFlag(StringRef s) {
@@ -451,7 +462,8 @@ static bool isKnownZFlag(StringRef s) {
s == "initfirst" || s == "interpose" ||
s == "keep-text-section-prefix" || s == "lazy" || s == "muldefs" ||
s == "separate-code" || s == "separate-loadable-segments" ||
@ -45,11 +44,7 @@ Index: lld/ELF/Driver.cpp
s == "nodefaultlib" || s == "nodelete" || s == "nodlopen" ||
s == "noexecstack" || s == "nognustack" ||
s == "nokeep-text-section-prefix" || s == "norelro" ||
+ s == "noretpolineplt" ||
s == "noseparate-code" || s == "nostart-stop-gc" || s == "notext" ||
s == "now" || s == "origin" || s == "pac-plt" || s == "rel" ||
s == "rela" || s == "relro" || s == "retpolineplt" ||
@@ -1045,8 +1058,6 @@ static void readConfigs(opt::InputArgList &args) {
@@ -1045,8 +1057,6 @@ static void readConfigs(opt::InputArgList &args) {
errorHandler().errorHandlingScript =
args.getLastArgValue(OPT_error_handling_script);
@ -58,7 +53,7 @@ Index: lld/ELF/Driver.cpp
config->exportDynamic =
args.hasFlag(OPT_export_dynamic, OPT_no_export_dynamic, false);
config->filterList = args::getStrings(args, OPT_filter);
@@ -1064,7 +1075,8 @@ static void readConfigs(opt::InputArgList &args) {
@@ -1064,7 +1074,8 @@ static void readConfigs(opt::InputArgList &args) {
config->ignoreDataAddressEquality =
args.hasArg(OPT_ignore_data_address_equality);
config->ignoreFunctionAddressEquality =
@ -68,7 +63,7 @@ Index: lld/ELF/Driver.cpp
config->init = args.getLastArgValue(OPT_init, "_init");
config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline);
config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate);
@@ -1118,7 +1130,12 @@ static void readConfigs(opt::InputArgList &args) {
@@ -1118,7 +1129,12 @@ static void readConfigs(opt::InputArgList &args) {
config->optimize = args::getInteger(args, OPT_O, 1);
config->orphanHandling = getOrphanHandling(args);
config->outputFile = args.getLastArgValue(OPT_o);
@ -81,7 +76,7 @@ Index: lld/ELF/Driver.cpp
config->printIcfSections =
args.hasFlag(OPT_print_icf_sections, OPT_no_print_icf_sections, false);
config->printGcSections =
@@ -1181,6 +1198,7 @@ static void readConfigs(opt::InputArgList &args) {
@@ -1181,6 +1197,7 @@ static void readConfigs(opt::InputArgList &args) {
config->zInterpose = hasZOption(args, "interpose");
config->zKeepTextSectionPrefix = getZFlag(
args, "keep-text-section-prefix", "nokeep-text-section-prefix", false);
@ -89,20 +84,7 @@ Index: lld/ELF/Driver.cpp
config->zNodefaultlib = hasZOption(args, "nodefaultlib");
config->zNodelete = hasZOption(args, "nodelete");
config->zNodlopen = hasZOption(args, "nodlopen");
@@ -1188,7 +1206,11 @@ static void readConfigs(opt::InputArgList &args) {
config->zOrigin = hasZOption(args, "origin");
config->zPacPlt = hasZOption(args, "pac-plt");
config->zRelro = getZFlag(args, "relro", "norelro", true);
- config->zRetpolineplt = hasZOption(args, "retpolineplt");
+#ifndef __OpenBSD__
+ config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", false);
+#else
+ config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", true);
+#endif
config->zRodynamic = hasZOption(args, "rodynamic");
config->zSeparate = getZSeparate(args);
config->zShstk = hasZOption(args, "shstk");
@@ -1459,6 +1481,23 @@ static void setConfigs(opt::InputArgList &args) {
@@ -1459,6 +1476,23 @@ static void setConfigs(opt::InputArgList &args) {
args.hasFlag(OPT_toc_optimize, OPT_no_toc_optimize, m == EM_PPC64);
config->pcRelOptimize =
args.hasFlag(OPT_pcrel_optimize, OPT_no_pcrel_optimize, m == EM_PPC64);
@ -126,7 +108,7 @@ Index: lld/ELF/Driver.cpp
}
// Returns a value of "-format" option.
@@ -1596,7 +1635,7 @@ void LinkerDriver::inferMachineType() {
@@ -1596,7 +1630,7 @@ void LinkerDriver::inferMachineType() {
}
// Parse -z max-page-size=<value>. The default value is defined by
@ -135,7 +117,7 @@ Index: lld/ELF/Driver.cpp
static uint64_t getMaxPageSize(opt::InputArgList &args) {
uint64_t val = args::getZOptionValue(args, OPT_z, "max-page-size",
target->defaultMaxPageSize);
@@ -1611,7 +1650,7 @@ static uint64_t getMaxPageSize(opt::InputArgList &args
@@ -1611,7 +1645,7 @@ static uint64_t getMaxPageSize(opt::InputArgList &args
}
// Parse -z common-page-size=<value>. The default value is defined by
@ -144,7 +126,7 @@ Index: lld/ELF/Driver.cpp
static uint64_t getCommonPageSize(opt::InputArgList &args) {
uint64_t val = args::getZOptionValue(args, OPT_z, "common-page-size",
target->defaultCommonPageSize);
@@ -1628,6 +1667,16 @@ static uint64_t getCommonPageSize(opt::InputArgList &a
@@ -1628,6 +1662,16 @@ static uint64_t getCommonPageSize(opt::InputArgList &a
return val;
}
@ -161,7 +143,7 @@ Index: lld/ELF/Driver.cpp
// Parses -image-base option.
static Optional<uint64_t> getImageBase(opt::InputArgList &args) {
// Because we are using "Config->maxPageSize" here, this function has to be
@@ -2414,6 +2463,11 @@ template <class ELFT> void LinkerDriver::link(opt::Inp
@@ -2414,6 +2458,11 @@ template <class ELFT> void LinkerDriver::link(opt::Inp
// optimizations such as DATA_SEGMENT_ALIGN in linker scripts. LLD's use of it
// is limited to writing trap instructions on the last executable segment.
config->commonPageSize = getCommonPageSize(args);