Add linker dependency to resolve pthread linking errors. Correct formatting error and clean up hexagon makefile.
PiperOrigin-RevId: 292644523
Change-Id: Ic9e66a3ce277851bfc9800d06d2b40655d24689a
diff --git a/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc b/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc
index 5050429..906a7f3 100644
--- a/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc
+++ b/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc
@@ -13,8 +13,6 @@
PLATFORM_ARGS = \
-DHEXAGON_ASM \
-DMALLOC_IN_STDLIB \
- -DMICRO_NN_ENABLED=1 \
- -DMICRO_TFLITE_ENABLED=0 \
-DNDEBUG \
-DPTHREAD_STUBS \
-DTF_LITE_STATIC_MEMORY \
@@ -29,13 +27,10 @@
-Wno-unused-parameter \
-Wno-write-strings \
-Wvla \
- -fdata-sections -ffunction-sections \
-fdata-sections \
-ffunction-sections \
-fmessage-length=0 \
-fno-builtin \
- -fno-builtin \
- -fno-builtin \
-fno-delete-null-pointer-checks \
-fno-exceptions \
-fno-register-global-dtors-with-atexit \
@@ -57,10 +52,11 @@
CXXFLAGS = $(PLATFORM_ARGS) -std=c++11
CCFLAGS = $(PLATFORM_ARGS) -std=c11
LDFLAGS += \
- -Wl,--gc-sections -lhexagon
+ -Wl,--gc-sections -lhexagon \
+ $(HEXAGON_SDK_PREFIX)/tools/HEXAGON_Tools/8.3.07/Tools/target/hexagon/lib/v66/libstdc++.a
ifndef HEXAGON_SDK_PREFIX
- $(error HEXAGON_SDK_PREFIX is undefined)
+ $(error HEXAGON_SDK_PREFIX is undefined)
endif
INCLUDES += \