Add support for building Position Independent Code (PIC) for Hexagon (#2323) BUG=312422326
diff --git a/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc b/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc index 14bd7b1..a6249a4 100644 --- a/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc +++ b/tensorflow/lite/micro/tools/make/targets/hexagon_makefile.inc
@@ -80,6 +80,10 @@ -mcpu=$(HEXAGON_CPU_VER) \ -m$(HEXAGON_CPU_VER) +ifeq ($(HEXAGON_PIC_BUILD), true) + PLATFORM_ARGS += -fPIC +endif + # See http://b/183462077 for more details on why we need -G0 for an LPI build. ifeq ($(HEXAGON_LPI_BUILD), true) PLATFORM_ARGS += -G0