Browse Source

* regenerated makefiles

git-svn-id: trunk@44861 -
Jonas Maebe 5 years ago
parent
commit
26ec913725
100 changed files with 788 additions and 500 deletions
  1. 2 5
      Makefile
  2. 8 5
      compiler/Makefile
  3. 8 5
      compiler/utils/Makefile
  4. 8 5
      installer/Makefile
  5. 2 5
      packages/Makefile
  6. 8 5
      packages/a52/Makefile
  7. 8 5
      packages/ami-extra/Makefile
  8. 8 5
      packages/amunits/Makefile
  9. 8 5
      packages/arosunits/Makefile
  10. 8 5
      packages/aspell/Makefile
  11. 8 5
      packages/bfd/Makefile
  12. 8 5
      packages/bzip2/Makefile
  13. 8 5
      packages/cairo/Makefile
  14. 8 5
      packages/cdrom/Makefile
  15. 8 5
      packages/cdrom/examples/Makefile
  16. 8 5
      packages/chm/Makefile
  17. 8 5
      packages/cocoaint/Makefile
  18. 8 5
      packages/dblib/Makefile
  19. 8 5
      packages/dbus/Makefile
  20. 8 5
      packages/dbus/examples/Makefile
  21. 8 5
      packages/dts/Makefile
  22. 8 5
      packages/fastcgi/Makefile
  23. 8 5
      packages/fcl-async/Makefile
  24. 8 5
      packages/fcl-base/Makefile
  25. 8 5
      packages/fcl-base/examples/Makefile
  26. 8 5
      packages/fcl-db/Makefile
  27. 8 5
      packages/fcl-db/src/base/Makefile
  28. 8 5
      packages/fcl-db/src/codegen/Makefile
  29. 8 5
      packages/fcl-db/src/datadict/Makefile
  30. 8 5
      packages/fcl-db/src/dbase/Makefile
  31. 8 5
      packages/fcl-db/src/export/Makefile
  32. 8 5
      packages/fcl-db/src/json/Makefile
  33. 8 5
      packages/fcl-db/src/memds/Makefile
  34. 8 5
      packages/fcl-db/src/paradox/Makefile
  35. 8 5
      packages/fcl-db/src/sdf/Makefile
  36. 8 5
      packages/fcl-db/src/sql/Makefile
  37. 8 5
      packages/fcl-db/src/sqldb/Makefile
  38. 8 5
      packages/fcl-db/src/sqldb/interbase/Makefile
  39. 8 5
      packages/fcl-db/src/sqldb/mssql/Makefile
  40. 8 5
      packages/fcl-db/src/sqldb/mysql/Makefile
  41. 8 5
      packages/fcl-db/src/sqldb/odbc/Makefile
  42. 8 5
      packages/fcl-db/src/sqldb/oracle/Makefile
  43. 8 5
      packages/fcl-db/src/sqldb/postgres/Makefile
  44. 8 5
      packages/fcl-db/src/sqldb/sqlite/Makefile
  45. 8 5
      packages/fcl-db/src/sqlite/Makefile
  46. 8 5
      packages/fcl-db/tests/Makefile
  47. 8 5
      packages/fcl-extra/Makefile
  48. 8 5
      packages/fcl-extra/examples/Makefile
  49. 8 5
      packages/fcl-fpcunit/Makefile
  50. 8 5
      packages/fcl-fpcunit/src/exampletests/Makefile
  51. 8 5
      packages/fcl-fpcunit/src/tests/Makefile
  52. 8 5
      packages/fcl-image/Makefile
  53. 8 5
      packages/fcl-image/examples/Makefile
  54. 8 5
      packages/fcl-js/Makefile
  55. 8 5
      packages/fcl-json/Makefile
  56. 8 5
      packages/fcl-net/Makefile
  57. 8 5
      packages/fcl-net/examples/Makefile
  58. 8 5
      packages/fcl-passrc/Makefile
  59. 8 5
      packages/fcl-pdf/Makefile
  60. 8 5
      packages/fcl-process/Makefile
  61. 8 5
      packages/fcl-registry/Makefile
  62. 8 5
      packages/fcl-registry/tests/Makefile
  63. 8 5
      packages/fcl-report/Makefile
  64. 8 5
      packages/fcl-res/Makefile
  65. 8 5
      packages/fcl-sdo/Makefile
  66. 8 5
      packages/fcl-sound/Makefile
  67. 8 5
      packages/fcl-stl/Makefile
  68. 8 5
      packages/fcl-web/Makefile
  69. 8 5
      packages/fcl-web/src/base/Makefile
  70. 8 5
      packages/fcl-web/src/jsonrpc/Makefile
  71. 8 5
      packages/fcl-web/src/webdata/Makefile
  72. 8 5
      packages/fcl-xml/Makefile
  73. 8 5
      packages/fftw/Makefile
  74. 8 5
      packages/fpgtk/Makefile
  75. 8 5
      packages/fpgtk/examples/Makefile
  76. 8 5
      packages/fpindexer/Makefile
  77. 8 5
      packages/fpmkunit/Makefile
  78. 8 5
      packages/fppkg/Makefile
  79. 8 5
      packages/fuse/Makefile
  80. 8 5
      packages/fv/Makefile
  81. 8 5
      packages/fv/examples/Makefile
  82. 8 5
      packages/gdbint/Makefile
  83. 8 5
      packages/gdbm/Makefile
  84. 8 5
      packages/gdbm/examples/Makefile
  85. 8 5
      packages/ggi/Makefile
  86. 8 5
      packages/ggi/examples/Makefile
  87. 8 5
      packages/gmp/Makefile
  88. 8 5
      packages/gmp/examples/Makefile
  89. 8 5
      packages/gnome1/Makefile
  90. 8 5
      packages/gnutls/Makefile
  91. 8 5
      packages/googleapi/Makefile
  92. 8 5
      packages/graph/Makefile
  93. 8 5
      packages/gtk1/Makefile
  94. 8 5
      packages/gtk1/examples/Makefile
  95. 8 5
      packages/gtk1/examples/tutorial/Makefile
  96. 8 5
      packages/gtk1/src/gtkgl/Makefile
  97. 8 5
      packages/gtk2/Makefile
  98. 8 5
      packages/gtk2/examples/Makefile
  99. 8 5
      packages/gtk2/examples/filechooser/Makefile
  100. 8 5
      packages/gtk2/examples/gettingstarted/Makefile

+ 2 - 5
Makefile

@@ -999,15 +999,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
compiler/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -2545,15 +2551,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
compiler/utils/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1689,15 +1695,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
installer/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -945,15 +951,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 2 - 5
packages/Makefile

@@ -587,15 +587,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/a52/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/ami-extra/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/amunits/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/arosunits/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/aspell/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/bfd/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/bzip2/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/cairo/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/cdrom/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/cdrom/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/chm/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/cocoaint/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/dblib/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/dbus/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/dbus/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/dts/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fastcgi/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-async/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-base/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-base/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/base/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1690,15 +1696,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/codegen/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/datadict/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/dbase/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1982,15 +1988,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/export/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/json/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -834,15 +840,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/memds/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/paradox/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sdf/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sql/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1689,15 +1695,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1524,15 +1530,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/interbase/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/mssql/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/mysql/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/odbc/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/oracle/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/postgres/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1404,15 +1410,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqldb/sqlite/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/src/sqlite/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -834,15 +840,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-db/tests/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-extra/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-extra/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -661,15 +667,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-fpcunit/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-fpcunit/src/exampletests/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-fpcunit/src/tests/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1119,15 +1125,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-image/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-image/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-js/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-json/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-net/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-net/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1402,15 +1408,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-passrc/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-pdf/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -581,15 +587,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-process/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -581,15 +587,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-registry/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-registry/tests/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -834,15 +840,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-report/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-res/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-sdo/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-sound/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-stl/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-web/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-web/src/base/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1405,15 +1411,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-web/src/jsonrpc/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1120,15 +1126,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-web/src/webdata/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1120,15 +1126,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fcl-xml/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fftw/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fpgtk/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fpgtk/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1117,15 +1123,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fpindexer/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fpmkunit/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -600,15 +606,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fppkg/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fuse/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fv/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/fv/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1116,15 +1122,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gdbint/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gdbm/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gdbm/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/ggi/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/ggi/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gmp/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gmp/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gnome1/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gnutls/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/googleapi/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/graph/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk1/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk1/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1402,15 +1408,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk1/examples/tutorial/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -547,15 +553,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk1/src/gtkgl/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -1121,15 +1127,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk2/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -557,15 +563,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk2/examples/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk2/examples/filechooser/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

+ 8 - 5
packages/gtk2/examples/gettingstarted/Makefile

@@ -196,6 +196,12 @@ $(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic
 endif
 override FPCOPT+=-Cp$(SUBARCH)
 endif
+ifeq ($(FULL_TARGET),xtensa-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
@@ -832,15 +838,12 @@ ifneq ($(CROSSGCC),)
 GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
 endif
 endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
 endif
 ifdef inUnix
 ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
+OTHERLIBDIR:=/usr/pkg/lib
 endif
-export GCCLIBDIR OTHERLIB
+export GCCLIBDIR OTHERLIBDIR
 endif
 BATCHEXT=.bat
 LOADEREXT=.as

Some files were not shown because too many files changed in this diff