Skip to content

Commit

Permalink
AGNi MIUI-ST v4.5 stable [5.4.257]
Browse files Browse the repository at this point in the history
  • Loading branch information
psndna88 committed Sep 23, 2023
1 parent 5b0459a commit 5500b7a
Show file tree
Hide file tree
Showing 4 changed files with 19,642 additions and 20,767 deletions.
6 changes: 3 additions & 3 deletions AGNi_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
KERNELDIR=`readlink -f .`

export AGNI_VERSION_PREFIX="stable"
export AGNI_VERSION="v4.4"
sed -i 's/5.4.254/5.4.256/' $KERNELDIR/arch/arm64/configs/agni_*
sed -i 's/v4.3-stable/v4.4-stable/' $KERNELDIR/arch/arm64/configs/agni_*
export AGNI_VERSION="v4.5"
sed -i 's/5.4.256/5.4.257/' $KERNELDIR/arch/arm64/configs/agni_*
sed -i 's/v4.4-stable/v4.5-stable/' $KERNELDIR/arch/arm64/configs/agni_*

echo " AGNi Version info loaded."

63 changes: 41 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -552,22 +552,41 @@ ifdef building_out_of_srctree
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
endif

ifneq ($(shell $(CC) --version 2>&1 | grep clang),)
ifneq ($(CROSS_COMPILE),)
CLANG_TRIPLE ?= $(CROSS_COMPILE)
CLANG_FLAGS += --target=$(notdir $(CLANG_TRIPLE:%-=%))
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y)
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
endif
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed 's/\#//g')

ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
# Individual arch/{arch}/Makefiles should use -EL/-EB to set intended
# endianness and -m32/-m64 to set word size based on Kconfigs instead of
# relying on the target triple.
CLANG_TARGET_FLAGS_arm := arm-linux-gnueabi
CLANG_TARGET_FLAGS_arm64 := aarch64-linux-gnu
CLANG_TARGET_FLAGS_hexagon := hexagon-linux-musl
CLANG_TARGET_FLAGS_m68k := m68k-linux-gnu
CLANG_TARGET_FLAGS_mips := mipsel-linux-gnu
CLANG_TARGET_FLAGS_powerpc := powerpc64le-linux-gnu
CLANG_TARGET_FLAGS_riscv := riscv64-linux-gnu
CLANG_TARGET_FLAGS_s390 := s390x-linux-gnu
CLANG_TARGET_FLAGS_x86 := x86_64-linux-gnu
CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(SRCARCH))

ifeq ($(CROSS_COMPILE),)
ifeq ($(CLANG_TARGET_FLAGS),)
$(error Specify CROSS_COMPILE or add '--target=' option to Makefile)
else
CLANG_FLAGS += --target=$(CLANG_TARGET_FLAGS)
endif # CLANG_TARGET_FLAGS
else
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
endif # CROSS_COMPILE

ifeq ($(LLVM_IAS),0)
CLANG_FLAGS += -no-integrated-as
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
endif
ifneq ($(GCC_TOOLCHAIN),)
CLANG_FLAGS += --gcc-toolchain=$(GCC_TOOLCHAIN)
endif
ifneq ($(LLVM_IAS),1)
CLANG_FLAGS += -no-integrated-as
endif
CLANG_FLAGS += -Werror=unknown-warning-option
CLANG_FLAGS += $(call cc-option, -Wno-misleading-indentation)
Expand All @@ -578,12 +597,6 @@ KBUILD_AFLAGS += $(CLANG_FLAGS)
export CLANG_FLAGS
endif

# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)

ifdef config-build
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
Expand Down Expand Up @@ -876,7 +889,7 @@ endif
ifeq ($(LLVM_IAS),1)
KBUILD_AFLAGS += -g
else
KBUILD_AFLAGS += -Wa,-gdwarf-2
KBUILD_AFLAGS += -Wa,-gdwarf-4
endif
endif

Expand Down Expand Up @@ -952,6 +965,12 @@ CC_FLAGS_LTO_CLANG := -flto
endif
CC_FLAGS_LTO_CLANG += -fvisibility=default

# Limit inlining across translation units to reduce binary size
LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5

KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)

KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
endif

Expand Down Expand Up @@ -1033,7 +1052,7 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)

# Require designated initializers for all marked structures
#KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)

# change __FILE__ to the relative path from the srctree
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
Expand Down
Loading

0 comments on commit 5500b7a

Please sign in to comment.