-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create proper debug configuration #6193
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ GNU_CONFIGURE = 1 | |
CONFIGURE_ARGS = --enable-shared | ||
CONFIGURE_ARGS += --enable-pic | ||
CONFIGURE_ARGS += --disable-opencl | ||
CONFIGURE_ARGS += --prefix=$(INSTALL_PREFIX) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is the prefix being removed? Presumably because the spksrc.configure.mk adds it anyway? |
||
CONFIGURE_ARGS += --cross-prefix=$(TC_PATH)$(TC_PREFIX) | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,12 @@ endif | |
|
||
# We normally build regular Release | ||
ifeq ($(strip $(CMAKE_BUILD_TYPE)),) | ||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=Release | ||
ifeq ($(strip $(GCC_DEBUG_INFO)),1) | ||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=Debug | ||
endif | ||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=Release | ||
Comment on lines
+10
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be ifeq / else / endif such as:
|
||
else | ||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) | ||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) | ||
endif | ||
|
||
# Set the default install prefix | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,19 @@ TOOLKIT_ROOT = $(WORK_DIR)/../../../toolkit/syno-$(ARCH)-$(TCVERSION)/work | |
ENV += TOOLKIT_ROOT=$(TOOLKIT_ROOT) | ||
endif | ||
|
||
ADDITIONAL_CFLAGS := $(patsubst -O%,,$(ADDITIONAL_CFLAGS)) | ||
ADDITIONAL_CPPFLAGS := $(patsubst -O%,,$(ADDITIONAL_CPPFLAGS)) | ||
ADDITIONAL_CXXFLAGS := $(patsubst -O%,,$(ADDITIONAL_CXXFLAGS)) | ||
ifeq ($(strip $(GCC_DEBUG_INFO)),1) | ||
GCC_DEBUG_FLAGS = -O0 -g3 | ||
ADDITIONAL_CFLAGS := $(patsubst -O%,,$(ADDITIONAL_CFLAGS)) $(GCC_DEBUG_FLAGS) | ||
ADDITIONAL_CPPFLAGS := $(patsubst -O%,,$(ADDITIONAL_CPPFLAGS)) $(GCC_DEBUG_FLAGS) | ||
ADDITIONAL_CXXFLAGS := $(patsubst -O%,,$(ADDITIONAL_CXXFLAGS)) $(GCC_DEBUG_FLAGS) | ||
# other options to consider: | ||
#GCC_DEBUG_FLAGS += -fsanitize=address -fsanitize=undefined -fstack-protector-all | ||
GCC_DEBUG_FLAGS = -ggdb3 -g3 | ||
else | ||
GCC_DEBUG_FLAGS = -O3 -fomit-frame-pointer | ||
endif | ||
ADDITIONAL_CFLAGS := $(ADDITIONAL_CFLAGS) $(GCC_DEBUG_FLAGS) | ||
ADDITIONAL_CPPFLAGS := $(ADDITIONAL_CPPFLAGS) $(GCC_DEBUG_FLAGS) | ||
ADDITIONAL_CXXFLAGS := $(ADDITIONAL_CXXFLAGS) $(GCC_DEBUG_FLAGS) | ||
Comment on lines
+24
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has a much broader effect than only affecting debug builds. This is turn will enforce using Also I believe this sort of explains the reasons for removing |
||
|
||
ifneq ($(strip $(TC)),) | ||
TC_VARS_MK = $(WORK_DIR)/tc_vars.mk | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,9 +153,9 @@ tc_vars: flag | |
gcc_version=$$(eval $$(echo $(WORK_DIR)/$(TC_TARGET)/bin/$(TC_PREFIX)$${source} -dumpversion) 2>/dev/null || true) ; \ | ||
fi ; \ | ||
done ; \ | ||
echo TC_ENV += CFLAGS=\"$(CFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CFLAGS\)\" ; \ | ||
echo TC_ENV += CPPFLAGS=\"$(CPPFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CPPFLAGS\)\" ; \ | ||
echo TC_ENV += CXXFLAGS=\"$(CXXFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CXXFLAGS\)\" ; \ | ||
echo TC_ENV += CFLAGS=\"$(CFLAGS) $$\(ADDITIONAL_CFLAGS\)\" ; \ | ||
echo TC_ENV += CPPFLAGS=\"$(CPPFLAGS) $$\(ADDITIONAL_CPPFLAGS\)\" ; \ | ||
echo TC_ENV += CXXFLAGS=\"$(CXXFLAGS) $$\(ADDITIONAL_CXXFLAGS\)\" ; \ | ||
echo TC_ENV += LDFLAGS=\"$(LDFLAGS) $$\(ADDITIONAL_LDFLAGS\)\" ; \ | ||
echo TC_ENV += CARGO_HOME=\"$(realpath $(CARGO_HOME))\" ; \ | ||
echo TC_ENV += RUSTUP_HOME=\"$(realpath $(RUSTUP_HOME))\" ; \ | ||
Comment on lines
-156
to
161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't thig be |
||
|
@@ -170,9 +170,9 @@ tc_vars: flag | |
echo TC_TARGET := $(TC_TARGET) ; \ | ||
echo TC_PREFIX := $(TC_PREFIX) ; \ | ||
echo TC_PATH := $(WORK_DIR)/$(TC_TARGET)/bin/ ; \ | ||
echo CFLAGS := $(CFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CFLAGS\) ; \ | ||
echo CPPFLAGS := $(CPPFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CPPFLAGS\) ; \ | ||
echo CXXFLAGS := $(CXXFLAGS) $(GCC_DEBUG) $$\(ADDITIONAL_CXXFLAGS\) ; \ | ||
echo CFLAGS := $(CFLAGS) $$\(ADDITIONAL_CFLAGS\) ; \ | ||
echo CPPFLAGS := $(CPPFLAGS) $$\(ADDITIONAL_CPPFLAGS\) ; \ | ||
echo CXXFLAGS := $(CXXFLAGS) $$\(ADDITIONAL_CXXFLAGS\) ; \ | ||
echo LDFLAGS := $(LDFLAGS) $$\(ADDITIONAL_LDFLAGS\) ; \ | ||
echo TC_INCLUDE := $(TC_INCLUDE) ; \ | ||
echo TC_LIBRARY := $(TC_LIBRARY) ; \ | ||
Comment on lines
170
to
178
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. likewise to previous comment. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code dates way-back, before I started maintaining ffmpeg. Why is only pkg-config related code kept?