summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-06 20:41:01 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-06 20:41:01 +0000
commit47a7c7a04e283181834b2a757b3d703c1d8c2099 (patch)
tree8f3ade940862f22e5f916e2a685d265abdbea3c0 /packages
parent001d79d670c15795c63fbbb97eb38109c75ef534 (diff)
downloadfpc-47a7c7a04e283181834b2a757b3d703c1d8c2099.tar.gz
* fixed fpmake invokation when building an i386-linux snapshot on a x86_64-linux host
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45298 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages')
-rw-r--r--packages/Makefile7
-rw-r--r--packages/a52/Makefile7
-rw-r--r--packages/ami-extra/Makefile7
-rw-r--r--packages/amunits/Makefile7
-rw-r--r--packages/arosunits/Makefile7
-rw-r--r--packages/aspell/Makefile7
-rw-r--r--packages/bfd/Makefile7
-rw-r--r--packages/bzip2/Makefile7
-rw-r--r--packages/cairo/Makefile7
-rw-r--r--packages/cdrom/Makefile7
-rw-r--r--packages/cdrom/examples/Makefile7
-rw-r--r--packages/chm/Makefile7
-rw-r--r--packages/cocoaint/Makefile7
-rw-r--r--packages/dblib/Makefile7
-rw-r--r--packages/dbus/Makefile7
-rw-r--r--packages/dbus/examples/Makefile7
-rw-r--r--packages/dts/Makefile7
-rw-r--r--packages/fastcgi/Makefile7
-rw-r--r--packages/fcl-async/Makefile7
-rw-r--r--packages/fcl-base/Makefile7
-rw-r--r--packages/fcl-base/examples/Makefile7
-rw-r--r--packages/fcl-db/Makefile7
-rw-r--r--packages/fcl-db/src/base/Makefile7
-rw-r--r--packages/fcl-db/src/codegen/Makefile7
-rw-r--r--packages/fcl-db/src/datadict/Makefile7
-rw-r--r--packages/fcl-db/src/dbase/Makefile7
-rw-r--r--packages/fcl-db/src/export/Makefile7
-rw-r--r--packages/fcl-db/src/json/Makefile7
-rw-r--r--packages/fcl-db/src/memds/Makefile7
-rw-r--r--packages/fcl-db/src/paradox/Makefile7
-rw-r--r--packages/fcl-db/src/sdf/Makefile7
-rw-r--r--packages/fcl-db/src/sql/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/interbase/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/mssql/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/mysql/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/odbc/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/oracle/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/postgres/Makefile7
-rw-r--r--packages/fcl-db/src/sqldb/sqlite/Makefile7
-rw-r--r--packages/fcl-db/src/sqlite/Makefile7
-rw-r--r--packages/fcl-db/tests/Makefile7
-rw-r--r--packages/fcl-extra/Makefile7
-rw-r--r--packages/fcl-extra/examples/Makefile7
-rw-r--r--packages/fcl-fpcunit/Makefile7
-rw-r--r--packages/fcl-fpcunit/src/exampletests/Makefile7
-rw-r--r--packages/fcl-fpcunit/src/tests/Makefile7
-rw-r--r--packages/fcl-image/Makefile7
-rw-r--r--packages/fcl-image/examples/Makefile7
-rw-r--r--packages/fcl-js/Makefile7
-rw-r--r--packages/fcl-json/Makefile7
-rw-r--r--packages/fcl-net/Makefile7
-rw-r--r--packages/fcl-net/examples/Makefile7
-rw-r--r--packages/fcl-passrc/Makefile7
-rw-r--r--packages/fcl-pdf/Makefile7
-rw-r--r--packages/fcl-process/Makefile7
-rw-r--r--packages/fcl-registry/Makefile7
-rw-r--r--packages/fcl-registry/tests/Makefile7
-rw-r--r--packages/fcl-report/Makefile7
-rw-r--r--packages/fcl-res/Makefile7
-rw-r--r--packages/fcl-sdo/Makefile7
-rw-r--r--packages/fcl-sound/Makefile7
-rw-r--r--packages/fcl-stl/Makefile7
-rw-r--r--packages/fcl-web/Makefile7
-rw-r--r--packages/fcl-web/src/base/Makefile7
-rw-r--r--packages/fcl-web/src/jsonrpc/Makefile7
-rw-r--r--packages/fcl-web/src/webdata/Makefile7
-rw-r--r--packages/fcl-xml/Makefile7
-rw-r--r--packages/fftw/Makefile7
-rw-r--r--packages/fpgtk/Makefile7
-rw-r--r--packages/fpgtk/examples/Makefile7
-rw-r--r--packages/fpindexer/Makefile7
-rw-r--r--packages/fpmkunit/Makefile7
-rw-r--r--packages/fppkg/Makefile7
-rw-r--r--packages/fuse/Makefile7
-rw-r--r--packages/fv/Makefile7
-rw-r--r--packages/fv/examples/Makefile7
-rw-r--r--packages/gdbint/Makefile7
-rw-r--r--packages/gdbm/Makefile7
-rw-r--r--packages/gdbm/examples/Makefile7
-rw-r--r--packages/ggi/Makefile7
-rw-r--r--packages/ggi/examples/Makefile7
-rw-r--r--packages/gmp/Makefile7
-rw-r--r--packages/gmp/examples/Makefile7
-rw-r--r--packages/gnome1/Makefile7
-rw-r--r--packages/gnutls/Makefile7
-rw-r--r--packages/googleapi/Makefile7
-rw-r--r--packages/graph/Makefile7
-rw-r--r--packages/gtk1/Makefile7
-rw-r--r--packages/gtk1/examples/Makefile7
-rw-r--r--packages/gtk1/examples/tutorial/Makefile7
-rw-r--r--packages/gtk1/src/gtkgl/Makefile7
-rw-r--r--packages/gtk2/Makefile7
-rw-r--r--packages/gtk2/examples/Makefile7
-rw-r--r--packages/gtk2/examples/filechooser/Makefile7
-rw-r--r--packages/gtk2/examples/gettingstarted/Makefile7
-rw-r--r--packages/gtk2/examples/gtk_demo/Makefile7
-rw-r--r--packages/gtk2/examples/gtkglext/Makefile7
-rw-r--r--packages/gtk2/examples/helloworld/Makefile7
-rw-r--r--packages/gtk2/examples/helloworld2/Makefile7
-rw-r--r--packages/gtk2/examples/plugins/Makefile7
-rw-r--r--packages/gtk2/examples/scribble_simple/Makefile7
-rw-r--r--packages/hash/Makefile7
-rw-r--r--packages/hash/examples/Makefile7
-rw-r--r--packages/hermes/Makefile7
-rw-r--r--packages/httpd13/Makefile7
-rw-r--r--packages/httpd20/Makefile7
-rw-r--r--packages/httpd20/examples/Makefile7
-rw-r--r--packages/httpd22/Makefile7
-rw-r--r--packages/httpd22/examples/Makefile7
-rw-r--r--packages/httpd24/Makefile7
-rw-r--r--packages/httpd24/examples/Makefile7
-rw-r--r--packages/ibase/Makefile7
-rw-r--r--packages/ibase/examples/Makefile7
-rw-r--r--packages/iconvenc/Makefile7
-rw-r--r--packages/iconvenc/examples/Makefile7
-rw-r--r--packages/ide/Makefile7
-rw-r--r--packages/ide/compiler/Makefile7
-rw-r--r--packages/ide/fakegdb/Makefile7
-rw-r--r--packages/imagemagick/Makefile7
-rw-r--r--packages/imlib/Makefile7
-rw-r--r--packages/iosxlocale/Makefile7
-rw-r--r--packages/jni/Makefile7
-rw-r--r--packages/ldap/Makefile7
-rw-r--r--packages/libc/Makefile7
-rw-r--r--packages/libcups/Makefile7
-rw-r--r--packages/libcurl/Makefile7
-rw-r--r--packages/libcurl/examples/Makefile7
-rw-r--r--packages/libenet/Makefile7
-rw-r--r--packages/libffi/Makefile7
-rw-r--r--packages/libfontconfig/Makefile7
-rw-r--r--packages/libgbafpc/Makefile7
-rw-r--r--packages/libgbafpc/examples/Makefile7
-rw-r--r--packages/libgbafpc/examples/audio/Makefile7
-rw-r--r--packages/libgbafpc/examples/audio/PlayBoyScout/Makefile7
-rw-r--r--packages/libgbafpc/examples/graphics/Makefile7
-rw-r--r--packages/libgbafpc/examples/graphics/PCXView/Makefile7
-rw-r--r--packages/libgbafpc/examples/graphics/SimpleBGScroll/Makefile7
-rw-r--r--packages/libgbafpc/examples/graphics/ansi_console/Makefile7
-rw-r--r--packages/libgbafpc/examples/template/Makefile7
-rw-r--r--packages/libgc/Makefile7
-rw-r--r--packages/libgd/Makefile7
-rw-r--r--packages/libgd/examples/Makefile7
-rw-r--r--packages/libmagic/Makefile7
-rw-r--r--packages/libmicrohttpd/Makefile7
-rw-r--r--packages/libndsfpc/Makefile7
-rw-r--r--packages/libndsfpc/examples/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/basic_sound/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/reverb/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/song_events_example/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/song_events_example2/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/maxmod/streaming/Makefile7
-rw-r--r--packages/libndsfpc/examples/audio/micrecord/Makefile7
-rw-r--r--packages/libndsfpc/examples/card/Makefile7
-rw-r--r--packages/libndsfpc/examples/card/eeprom/Makefile7
-rw-r--r--packages/libndsfpc/examples/debugging/Makefile7
-rw-r--r--packages/libndsfpc/examples/debugging/exceptionTest/Makefile7
-rw-r--r--packages/libndsfpc/examples/ds_motion/Makefile7
-rw-r--r--packages/libndsfpc/examples/dswifi/Makefile7
-rw-r--r--packages/libndsfpc/examples/dswifi/ap_search/Makefile7
-rw-r--r--packages/libndsfpc/examples/dswifi/autoconnect/Makefile7
-rw-r--r--packages/libndsfpc/examples/dswifi/httpget/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/embedded_gbfs/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/libfat/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/libfat/access_dir/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/libfat/access_file/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/libfat/libfatdir/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/nitrofs/Makefile7
-rw-r--r--packages/libndsfpc/examples/filesystem/nitrofs/nitrodir/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/2Dplus3D/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/dual_screen/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/fonts/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/primitives/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/scrolling/Makefile7
-rw-r--r--packages/libndsfpc/examples/gl2d/sprites/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/3D_Both_Screens/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/BoxTest/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Display_List/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Display_List_2/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Env_Mapping/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Mixed_Text_3D/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Ortho/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Paletted_Cube/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Picking/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Simple_Quad/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Simple_Tri/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Textured_Cube/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Textured_Quad/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/Toon_Shading/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson01/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson02/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson03/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson04/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson05/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson06/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson07/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson08/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson09/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson10/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson10b/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/3D/nehe/lesson11/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/16bit_color_bmp/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/256_color_bmp/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/Double_Buffer/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/all_in_one/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Backgrounds/rotation/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Effects/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Effects/windows/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Ext_Palettes/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Ext_Palettes/backgrounds/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/ansi_console/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/console_windows/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/print_both_screens/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Printing/rotscale_text/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/allocation_test/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/animate_simple/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/bitmap_sprites/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/fire_and_sprites/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/simple/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/sprite_extended_palettes/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/Sprites/sprite_rotate/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/grit/256colorTilemap/Makefile7
-rw-r--r--packages/libndsfpc/examples/graphics/grit/Makefile7
-rw-r--r--packages/libndsfpc/examples/hello_world/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/Touch_Pad/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/Touch_Pad/touch_area/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/Touch_Pad/touch_look/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/Touch_Pad/touch_test/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/keyboard/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/keyboard/keyboard_async/Makefile7
-rw-r--r--packages/libndsfpc/examples/input/keyboard/keyboard_stdin/Makefile7
-rw-r--r--packages/libndsfpc/examples/time/Makefile7
-rw-r--r--packages/libndsfpc/examples/time/RealTimeClock/Makefile7
-rw-r--r--packages/libndsfpc/examples/time/stopwatch/Makefile7
-rw-r--r--packages/libndsfpc/examples/time/timercallback/Makefile7
-rw-r--r--packages/libogcfpc/Makefile7
-rw-r--r--packages/libogcfpc/examples/Makefile7
-rw-r--r--packages/libogcfpc/examples/audio/Makefile7
-rw-r--r--packages/libogcfpc/examples/audio/modplay/Makefile7
-rw-r--r--packages/libogcfpc/examples/audio/mp3player/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/network/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/network/sockettest/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/usbkeyboard/Makefile7
-rw-r--r--packages/libogcfpc/examples/devices/usbkeyboard/basic_stdin/Makefile7
-rw-r--r--packages/libogcfpc/examples/filesystem/Makefile7
-rw-r--r--packages/libogcfpc/examples/filesystem/directory/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile7
-rw-r--r--packages/libogcfpc/examples/graphics/gx/triangle/Makefile7
-rw-r--r--packages/libogcfpc/examples/template/Makefile7
-rw-r--r--packages/libpng/Makefile7
-rw-r--r--packages/librsvg/Makefile7
-rw-r--r--packages/libsee/Makefile7
-rw-r--r--packages/libsee/examples/Makefile7
-rw-r--r--packages/libtar/Makefile7
-rw-r--r--packages/libusb/Makefile7
-rw-r--r--packages/libvlc/Makefile7
-rw-r--r--packages/libxml/Makefile7
-rw-r--r--packages/libxml/examples/Makefile7
-rw-r--r--packages/lua/Makefile7
-rw-r--r--packages/mad/Makefile7
-rw-r--r--packages/matroska/Makefile7
-rw-r--r--packages/modplug/Makefile7
-rw-r--r--packages/morphunits/Makefile7
-rw-r--r--packages/mysql/Makefile7
-rw-r--r--packages/mysql/examples/Makefile7
-rw-r--r--packages/ncurses/Makefile7
-rw-r--r--packages/ncurses/examples/Makefile7
-rw-r--r--packages/newt/Makefile7
-rw-r--r--packages/newt/examples/Makefile7
-rw-r--r--packages/numlib/Makefile7
-rw-r--r--packages/numlib/examples/Makefile7
-rw-r--r--packages/nvapi/Makefile7
-rw-r--r--packages/objcrtl/Makefile7
-rw-r--r--packages/odata/Makefile7
-rw-r--r--packages/odbc/Makefile7
-rw-r--r--packages/odbc/examples/Makefile7
-rw-r--r--packages/oggvorbis/Makefile7
-rw-r--r--packages/openal/Makefile7
-rw-r--r--packages/openal/examples/Makefile7
-rw-r--r--packages/opencl/Makefile7
-rw-r--r--packages/opengl/Makefile7
-rw-r--r--packages/opengl/examples/Makefile7
-rw-r--r--packages/opengles/Makefile7
-rw-r--r--packages/opengles/examples/Makefile7
-rw-r--r--packages/openssl/Makefile7
-rw-r--r--packages/oracle/Makefile7
-rw-r--r--packages/oracle/examples/Makefile7
-rw-r--r--packages/os2units/Makefile7
-rw-r--r--packages/os2units/examples/Makefile7
-rw-r--r--packages/os4units/Makefile7
-rw-r--r--packages/palmunits/Makefile7
-rw-r--r--packages/pasjpeg/Makefile7
-rw-r--r--packages/pastojs/Makefile7
-rw-r--r--packages/paszlib/Makefile7
-rw-r--r--packages/paszlib/examples/Makefile7
-rw-r--r--packages/pcap/Makefile7
-rw-r--r--packages/postgres/Makefile7
-rw-r--r--packages/postgres/examples/Makefile7
-rw-r--r--packages/proj4/Makefile7
-rw-r--r--packages/ptc/Makefile7
-rw-r--r--packages/ptc/examples/Makefile7
-rw-r--r--packages/pthreads/Makefile7
-rw-r--r--packages/pxlib/Makefile7
-rw-r--r--packages/pxlib/examples/Makefile7
-rw-r--r--packages/regexpr/Makefile7
-rw-r--r--packages/regexpr/examples/Makefile7
-rw-r--r--packages/rexx/Makefile7
-rw-r--r--packages/rexx/examples/Makefile7
-rw-r--r--packages/rtl-console/Makefile7
-rw-r--r--packages/rtl-extra/Makefile7
-rw-r--r--packages/rtl-generics/Makefile7
-rw-r--r--packages/rtl-objpas/Makefile7
-rw-r--r--packages/rtl-unicode/Makefile7
-rw-r--r--packages/sdl/Makefile7
-rw-r--r--packages/sndfile/Makefile7
-rw-r--r--packages/sqlite/Makefile7
-rw-r--r--packages/svgalib/Makefile7
-rw-r--r--packages/svgalib/examples/Makefile7
-rw-r--r--packages/symbolic/Makefile7
-rw-r--r--packages/symbolic/examples/Makefile7
-rw-r--r--packages/syslog/Makefile7
-rw-r--r--packages/syslog/examples/Makefile7
-rw-r--r--packages/tcl/Makefile7
-rw-r--r--packages/tosunits/Makefile7
-rw-r--r--packages/univint/Makefile7
-rw-r--r--packages/univint/examples/Makefile7
-rw-r--r--packages/unixutil/Makefile7
-rw-r--r--packages/unzip/Makefile7
-rw-r--r--packages/users/Makefile7
-rw-r--r--packages/users/examples/Makefile7
-rw-r--r--packages/utmp/Makefile7
-rw-r--r--packages/utmp/examples/Makefile7
-rw-r--r--packages/uuid/Makefile7
-rw-r--r--packages/uuid/examples/Makefile7
-rw-r--r--packages/vcl-compat/Makefile7
-rw-r--r--packages/webidl/Makefile7
-rw-r--r--packages/winceunits/Makefile7
-rw-r--r--packages/winunits-base/Makefile7
-rw-r--r--packages/winunits-jedi/Makefile7
-rw-r--r--packages/x11/Makefile7
-rw-r--r--packages/xforms/Makefile7
-rw-r--r--packages/xforms/examples/Makefile7
-rw-r--r--packages/zlib/Makefile7
-rw-r--r--packages/zorba/Makefile7
372 files changed, 2232 insertions, 372 deletions
diff --git a/packages/Makefile b/packages/Makefile
index 96d0a385af..6b7b1348f0 100644
--- a/packages/Makefile
+++ b/packages/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1546,8 +1547,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/a52/Makefile b/packages/a52/Makefile
index 4af78ecb40..9928df2d76 100644
--- a/packages/a52/Makefile
+++ b/packages/a52/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ami-extra/Makefile b/packages/ami-extra/Makefile
index 29de9e589d..f97993bc98 100644
--- a/packages/ami-extra/Makefile
+++ b/packages/ami-extra/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/amunits/Makefile b/packages/amunits/Makefile
index add708c12a..23bfcaf6f0 100644
--- a/packages/amunits/Makefile
+++ b/packages/amunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/arosunits/Makefile b/packages/arosunits/Makefile
index 4aab20cead..94ae711d1f 100644
--- a/packages/arosunits/Makefile
+++ b/packages/arosunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/aspell/Makefile b/packages/aspell/Makefile
index 2d380bb02b..2dd860e55e 100644
--- a/packages/aspell/Makefile
+++ b/packages/aspell/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/bfd/Makefile b/packages/bfd/Makefile
index b7126415e6..8116f718fd 100644
--- a/packages/bfd/Makefile
+++ b/packages/bfd/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/bzip2/Makefile b/packages/bzip2/Makefile
index 6044025fbc..a41d31fe71 100644
--- a/packages/bzip2/Makefile
+++ b/packages/bzip2/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/cairo/Makefile b/packages/cairo/Makefile
index 5f8cc63263..8bb8557414 100644
--- a/packages/cairo/Makefile
+++ b/packages/cairo/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/cdrom/Makefile b/packages/cdrom/Makefile
index b9608d4be1..f065b7c961 100644
--- a/packages/cdrom/Makefile
+++ b/packages/cdrom/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/cdrom/examples/Makefile b/packages/cdrom/examples/Makefile
index 4ba6fa3e2b..1252d56451 100644
--- a/packages/cdrom/examples/Makefile
+++ b/packages/cdrom/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/chm/Makefile b/packages/chm/Makefile
index 5dd5ab88a5..55756c3b53 100644
--- a/packages/chm/Makefile
+++ b/packages/chm/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/cocoaint/Makefile b/packages/cocoaint/Makefile
index d76c754136..b8c6eb2faf 100644
--- a/packages/cocoaint/Makefile
+++ b/packages/cocoaint/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/dblib/Makefile b/packages/dblib/Makefile
index 948b10288a..0fd079e8f0 100644
--- a/packages/dblib/Makefile
+++ b/packages/dblib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/dbus/Makefile b/packages/dbus/Makefile
index 2efb5c6566..3e7e0b4f6b 100644
--- a/packages/dbus/Makefile
+++ b/packages/dbus/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/dbus/examples/Makefile b/packages/dbus/examples/Makefile
index 726dccb173..25874e29b0 100644
--- a/packages/dbus/examples/Makefile
+++ b/packages/dbus/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/dts/Makefile b/packages/dts/Makefile
index 8dbae848bc..9774c2bba8 100644
--- a/packages/dts/Makefile
+++ b/packages/dts/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fastcgi/Makefile b/packages/fastcgi/Makefile
index ea11f493d3..0928ce58fc 100644
--- a/packages/fastcgi/Makefile
+++ b/packages/fastcgi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-async/Makefile b/packages/fcl-async/Makefile
index ede519cabd..bb6b29d741 100644
--- a/packages/fcl-async/Makefile
+++ b/packages/fcl-async/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-base/Makefile b/packages/fcl-base/Makefile
index b3570799b9..6009512ffe 100644
--- a/packages/fcl-base/Makefile
+++ b/packages/fcl-base/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-base/examples/Makefile b/packages/fcl-base/examples/Makefile
index ef1f21b471..d15a066033 100644
--- a/packages/fcl-base/examples/Makefile
+++ b/packages/fcl-base/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3727,8 +3728,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/Makefile b/packages/fcl-db/Makefile
index fbf7eb649f..194a4bc7eb 100644
--- a/packages/fcl-db/Makefile
+++ b/packages/fcl-db/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/base/Makefile b/packages/fcl-db/src/base/Makefile
index c2ad8cb746..f5868f2447 100644
--- a/packages/fcl-db/src/base/Makefile
+++ b/packages/fcl-db/src/base/Makefile
@@ -1763,6 +1763,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1774,7 +1775,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3662,8 +3663,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/codegen/Makefile b/packages/fcl-db/src/codegen/Makefile
index 22d94c28ff..769c07811c 100644
--- a/packages/fcl-db/src/codegen/Makefile
+++ b/packages/fcl-db/src/codegen/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3227,8 +3228,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/datadict/Makefile b/packages/fcl-db/src/datadict/Makefile
index e88112d164..14dd5aaf7b 100644
--- a/packages/fcl-db/src/datadict/Makefile
+++ b/packages/fcl-db/src/datadict/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3824,8 +3825,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/dbase/Makefile b/packages/fcl-db/src/dbase/Makefile
index 6c354709c5..656079e4f5 100644
--- a/packages/fcl-db/src/dbase/Makefile
+++ b/packages/fcl-db/src/dbase/Makefile
@@ -2067,6 +2067,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2078,7 +2079,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3829,8 +3830,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/export/Makefile b/packages/fcl-db/src/export/Makefile
index d12ff81c95..f420fa1bc1 100644
--- a/packages/fcl-db/src/export/Makefile
+++ b/packages/fcl-db/src/export/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3364,8 +3365,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/json/Makefile b/packages/fcl-db/src/json/Makefile
index 1e18c10f73..8a8b50db3f 100644
--- a/packages/fcl-db/src/json/Makefile
+++ b/packages/fcl-db/src/json/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2770,8 +2771,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/memds/Makefile b/packages/fcl-db/src/memds/Makefile
index de5c7549ca..ee41d3d533 100644
--- a/packages/fcl-db/src/memds/Makefile
+++ b/packages/fcl-db/src/memds/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3227,8 +3228,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/paradox/Makefile b/packages/fcl-db/src/paradox/Makefile
index b12fe88e08..b23fafec3c 100644
--- a/packages/fcl-db/src/paradox/Makefile
+++ b/packages/fcl-db/src/paradox/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3067,8 +3068,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sdf/Makefile b/packages/fcl-db/src/sdf/Makefile
index d36a0627f7..1e7ea57a1e 100644
--- a/packages/fcl-db/src/sdf/Makefile
+++ b/packages/fcl-db/src/sdf/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2930,8 +2931,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sql/Makefile b/packages/fcl-db/src/sql/Makefile
index 45c10dcfc3..43bf487563 100644
--- a/packages/fcl-db/src/sql/Makefile
+++ b/packages/fcl-db/src/sql/Makefile
@@ -1762,6 +1762,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1773,7 +1774,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3524,8 +3525,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/Makefile b/packages/fcl-db/src/sqldb/Makefile
index ec148a7086..55a338282c 100644
--- a/packages/fcl-db/src/sqldb/Makefile
+++ b/packages/fcl-db/src/sqldb/Makefile
@@ -1588,6 +1588,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1599,7 +1600,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3887,8 +3888,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/interbase/Makefile b/packages/fcl-db/src/sqldb/interbase/Makefile
index 934242d0bf..3cf87f8f49 100644
--- a/packages/fcl-db/src/sqldb/interbase/Makefile
+++ b/packages/fcl-db/src/sqldb/interbase/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3067,8 +3068,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/mssql/Makefile b/packages/fcl-db/src/sqldb/mssql/Makefile
index 1502193bb6..a60a726ac8 100644
--- a/packages/fcl-db/src/sqldb/mssql/Makefile
+++ b/packages/fcl-db/src/sqldb/mssql/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2930,8 +2931,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/mysql/Makefile b/packages/fcl-db/src/sqldb/mysql/Makefile
index c2af125259..54e8cd5ac7 100644
--- a/packages/fcl-db/src/sqldb/mysql/Makefile
+++ b/packages/fcl-db/src/sqldb/mysql/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3364,8 +3365,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/odbc/Makefile b/packages/fcl-db/src/sqldb/odbc/Makefile
index c9f13d19c0..f5b3e3372d 100644
--- a/packages/fcl-db/src/sqldb/odbc/Makefile
+++ b/packages/fcl-db/src/sqldb/odbc/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3067,8 +3068,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/oracle/Makefile b/packages/fcl-db/src/sqldb/oracle/Makefile
index e3c4f7c660..7d9b3a7cbb 100644
--- a/packages/fcl-db/src/sqldb/oracle/Makefile
+++ b/packages/fcl-db/src/sqldb/oracle/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3364,8 +3365,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/postgres/Makefile b/packages/fcl-db/src/sqldb/postgres/Makefile
index 3b2a1368de..b96dbfd6e9 100644
--- a/packages/fcl-db/src/sqldb/postgres/Makefile
+++ b/packages/fcl-db/src/sqldb/postgres/Makefile
@@ -1465,6 +1465,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1476,7 +1477,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3364,8 +3365,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqldb/sqlite/Makefile b/packages/fcl-db/src/sqldb/sqlite/Makefile
index 27efde81ce..4f8a4a66d2 100644
--- a/packages/fcl-db/src/sqldb/sqlite/Makefile
+++ b/packages/fcl-db/src/sqldb/sqlite/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3067,8 +3068,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/src/sqlite/Makefile b/packages/fcl-db/src/sqlite/Makefile
index e57d06b4b9..f0e0e9bd8f 100644
--- a/packages/fcl-db/src/sqlite/Makefile
+++ b/packages/fcl-db/src/sqlite/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2770,8 +2771,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-db/tests/Makefile b/packages/fcl-db/tests/Makefile
index 00ba447f2a..c91ddd17cc 100644
--- a/packages/fcl-db/tests/Makefile
+++ b/packages/fcl-db/tests/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3067,8 +3068,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-extra/Makefile b/packages/fcl-extra/Makefile
index 272685a1ab..f7d49f0e75 100644
--- a/packages/fcl-extra/Makefile
+++ b/packages/fcl-extra/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-extra/examples/Makefile b/packages/fcl-extra/examples/Makefile
index a6074084af..62ad3d783d 100644
--- a/packages/fcl-extra/examples/Makefile
+++ b/packages/fcl-extra/examples/Makefile
@@ -689,6 +689,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -700,7 +701,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2588,8 +2589,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-fpcunit/Makefile b/packages/fcl-fpcunit/Makefile
index 2190361059..231d921a05 100644
--- a/packages/fcl-fpcunit/Makefile
+++ b/packages/fcl-fpcunit/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-fpcunit/src/exampletests/Makefile b/packages/fcl-fpcunit/src/exampletests/Makefile
index 0be0f26044..3e7cecc571 100644
--- a/packages/fcl-fpcunit/src/exampletests/Makefile
+++ b/packages/fcl-fpcunit/src/exampletests/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3204,8 +3205,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-fpcunit/src/tests/Makefile b/packages/fcl-fpcunit/src/tests/Makefile
index a0c3290da6..58e632fe94 100644
--- a/packages/fcl-fpcunit/src/tests/Makefile
+++ b/packages/fcl-fpcunit/src/tests/Makefile
@@ -1168,6 +1168,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1179,7 +1180,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3204,8 +3205,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-image/Makefile b/packages/fcl-image/Makefile
index a98711d663..60adc31660 100644
--- a/packages/fcl-image/Makefile
+++ b/packages/fcl-image/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-image/examples/Makefile b/packages/fcl-image/examples/Makefile
index b51dbf7c83..c4b6d70757 100644
--- a/packages/fcl-image/examples/Makefile
+++ b/packages/fcl-image/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-js/Makefile b/packages/fcl-js/Makefile
index e632311a37..a9980f024a 100644
--- a/packages/fcl-js/Makefile
+++ b/packages/fcl-js/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-json/Makefile b/packages/fcl-json/Makefile
index 4dab831bfb..aca47f5d10 100644
--- a/packages/fcl-json/Makefile
+++ b/packages/fcl-json/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-net/Makefile b/packages/fcl-net/Makefile
index 24bbf99593..0c3b09e2be 100644
--- a/packages/fcl-net/Makefile
+++ b/packages/fcl-net/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-net/examples/Makefile b/packages/fcl-net/examples/Makefile
index 4ea5b9b2d2..e87b898fb6 100644
--- a/packages/fcl-net/examples/Makefile
+++ b/packages/fcl-net/examples/Makefile
@@ -1463,6 +1463,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1474,7 +1475,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3499,8 +3500,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-passrc/Makefile b/packages/fcl-passrc/Makefile
index 6583fa7921..4a9fddabf9 100644
--- a/packages/fcl-passrc/Makefile
+++ b/packages/fcl-passrc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-pdf/Makefile b/packages/fcl-pdf/Makefile
index ebbe2c0f98..7057d18389 100644
--- a/packages/fcl-pdf/Makefile
+++ b/packages/fcl-pdf/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2368,8 +2369,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-process/Makefile b/packages/fcl-process/Makefile
index 5f0718d102..1263a53bf4 100644
--- a/packages/fcl-process/Makefile
+++ b/packages/fcl-process/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1546,8 +1547,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-registry/Makefile b/packages/fcl-registry/Makefile
index 9cea3a70bf..feef0c914c 100644
--- a/packages/fcl-registry/Makefile
+++ b/packages/fcl-registry/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-registry/tests/Makefile b/packages/fcl-registry/tests/Makefile
index bd48ff072f..0d0ca739db 100644
--- a/packages/fcl-registry/tests/Makefile
+++ b/packages/fcl-registry/tests/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1811,8 +1812,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-report/Makefile b/packages/fcl-report/Makefile
index 2c7a122590..49275bcdd5 100644
--- a/packages/fcl-report/Makefile
+++ b/packages/fcl-report/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2618,8 +2619,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-res/Makefile b/packages/fcl-res/Makefile
index c40e9718e5..ab9c95e007 100644
--- a/packages/fcl-res/Makefile
+++ b/packages/fcl-res/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-sdo/Makefile b/packages/fcl-sdo/Makefile
index 783602e1bf..04ea416fb2 100644
--- a/packages/fcl-sdo/Makefile
+++ b/packages/fcl-sdo/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-sound/Makefile b/packages/fcl-sound/Makefile
index a9a7f30968..fae9eb7f10 100644
--- a/packages/fcl-sound/Makefile
+++ b/packages/fcl-sound/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-stl/Makefile b/packages/fcl-stl/Makefile
index f7092b7a6a..2842736f72 100644
--- a/packages/fcl-stl/Makefile
+++ b/packages/fcl-stl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-web/Makefile b/packages/fcl-web/Makefile
index ece8618be0..6ccbf1c026 100644
--- a/packages/fcl-web/Makefile
+++ b/packages/fcl-web/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-web/src/base/Makefile b/packages/fcl-web/src/base/Makefile
index bf6c0592b3..50f6b276dc 100644
--- a/packages/fcl-web/src/base/Makefile
+++ b/packages/fcl-web/src/base/Makefile
@@ -1466,6 +1466,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1477,7 +1478,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4096,8 +4097,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-web/src/jsonrpc/Makefile b/packages/fcl-web/src/jsonrpc/Makefile
index fa29198c69..588388426f 100644
--- a/packages/fcl-web/src/jsonrpc/Makefile
+++ b/packages/fcl-web/src/jsonrpc/Makefile
@@ -1169,6 +1169,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1180,7 +1181,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3205,8 +3206,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-web/src/webdata/Makefile b/packages/fcl-web/src/webdata/Makefile
index 7bcaa6f6b6..12d17eb195 100644
--- a/packages/fcl-web/src/webdata/Makefile
+++ b/packages/fcl-web/src/webdata/Makefile
@@ -1169,6 +1169,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1180,7 +1181,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3342,8 +3343,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fcl-xml/Makefile b/packages/fcl-xml/Makefile
index 5be6b0b048..e988ebbb6c 100644
--- a/packages/fcl-xml/Makefile
+++ b/packages/fcl-xml/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fftw/Makefile b/packages/fftw/Makefile
index 5f1c7d8d13..be4ff04459 100644
--- a/packages/fftw/Makefile
+++ b/packages/fftw/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fpgtk/Makefile b/packages/fpgtk/Makefile
index fe3fcf4837..c044a3851f 100644
--- a/packages/fpgtk/Makefile
+++ b/packages/fpgtk/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fpgtk/examples/Makefile b/packages/fpgtk/examples/Makefile
index 0722f36b6f..683fa12e13 100644
--- a/packages/fpgtk/examples/Makefile
+++ b/packages/fpgtk/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fpindexer/Makefile b/packages/fpindexer/Makefile
index e144b1160d..ae5178bf74 100644
--- a/packages/fpindexer/Makefile
+++ b/packages/fpindexer/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fpmkunit/Makefile b/packages/fpmkunit/Makefile
index 45288ba50f..de4ac22c9d 100644
--- a/packages/fpmkunit/Makefile
+++ b/packages/fpmkunit/Makefile
@@ -625,6 +625,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -636,7 +637,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2113,8 +2114,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fppkg/Makefile b/packages/fppkg/Makefile
index 86713fbcfb..df979bbde2 100644
--- a/packages/fppkg/Makefile
+++ b/packages/fppkg/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fuse/Makefile b/packages/fuse/Makefile
index 291b6e7c24..98580bfb3e 100644
--- a/packages/fuse/Makefile
+++ b/packages/fuse/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fv/Makefile b/packages/fv/Makefile
index 24d08bd3ce..d2ed370f6e 100644
--- a/packages/fv/Makefile
+++ b/packages/fv/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/fv/examples/Makefile b/packages/fv/examples/Makefile
index 4840f1e297..990d6826e4 100644
--- a/packages/fv/examples/Makefile
+++ b/packages/fv/examples/Makefile
@@ -1165,6 +1165,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1176,7 +1177,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2927,8 +2928,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gdbint/Makefile b/packages/gdbint/Makefile
index 003e5c01be..28d87f7666 100644
--- a/packages/gdbint/Makefile
+++ b/packages/gdbint/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gdbm/Makefile b/packages/gdbm/Makefile
index 6958ac47f1..cb345090df 100644
--- a/packages/gdbm/Makefile
+++ b/packages/gdbm/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gdbm/examples/Makefile b/packages/gdbm/examples/Makefile
index 3955f6e746..b360c70c5e 100644
--- a/packages/gdbm/examples/Makefile
+++ b/packages/gdbm/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ggi/Makefile b/packages/ggi/Makefile
index 97e40c4e18..a93492e633 100644
--- a/packages/ggi/Makefile
+++ b/packages/ggi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ggi/examples/Makefile b/packages/ggi/examples/Makefile
index 9fa119decc..9f4d2792ef 100644
--- a/packages/ggi/examples/Makefile
+++ b/packages/ggi/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gmp/Makefile b/packages/gmp/Makefile
index 345516cf2f..6816a9da94 100644
--- a/packages/gmp/Makefile
+++ b/packages/gmp/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gmp/examples/Makefile b/packages/gmp/examples/Makefile
index 0a1200c1e9..3b6ec9208c 100644
--- a/packages/gmp/examples/Makefile
+++ b/packages/gmp/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gnome1/Makefile b/packages/gnome1/Makefile
index aed8dd946a..b5d5570863 100644
--- a/packages/gnome1/Makefile
+++ b/packages/gnome1/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gnutls/Makefile b/packages/gnutls/Makefile
index c2f97b076d..ba3e2e9120 100644
--- a/packages/gnutls/Makefile
+++ b/packages/gnutls/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2344,8 +2345,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/googleapi/Makefile b/packages/googleapi/Makefile
index c457ea46bc..1a13ba2a9f 100644
--- a/packages/googleapi/Makefile
+++ b/packages/googleapi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/graph/Makefile b/packages/graph/Makefile
index 884942e721..ac19ad2637 100644
--- a/packages/graph/Makefile
+++ b/packages/graph/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk1/Makefile b/packages/gtk1/Makefile
index 1c4b9d1bbe..31ffb4f89d 100644
--- a/packages/gtk1/Makefile
+++ b/packages/gtk1/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk1/examples/Makefile b/packages/gtk1/examples/Makefile
index 2425e37230..2adc671fc6 100644
--- a/packages/gtk1/examples/Makefile
+++ b/packages/gtk1/examples/Makefile
@@ -1463,6 +1463,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1474,7 +1475,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3225,8 +3226,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk1/examples/tutorial/Makefile b/packages/gtk1/examples/tutorial/Makefile
index 34f6150e3d..573d9e8712 100644
--- a/packages/gtk1/examples/tutorial/Makefile
+++ b/packages/gtk1/examples/tutorial/Makefile
@@ -572,6 +572,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -583,7 +584,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2334,8 +2335,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk1/src/gtkgl/Makefile b/packages/gtk1/src/gtkgl/Makefile
index c5cbd70739..1f560c5aad 100644
--- a/packages/gtk1/src/gtkgl/Makefile
+++ b/packages/gtk1/src/gtkgl/Makefile
@@ -1170,6 +1170,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1181,7 +1182,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2932,8 +2933,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/Makefile b/packages/gtk2/Makefile
index 70343eda8a..1692c448e4 100644
--- a/packages/gtk2/Makefile
+++ b/packages/gtk2/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/Makefile b/packages/gtk2/examples/Makefile
index a2447cda19..b37a3f6fe1 100644
--- a/packages/gtk2/examples/Makefile
+++ b/packages/gtk2/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2768,8 +2769,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/filechooser/Makefile b/packages/gtk2/examples/filechooser/Makefile
index 7aab5098fa..52ad9e7ff5 100644
--- a/packages/gtk2/examples/filechooser/Makefile
+++ b/packages/gtk2/examples/filechooser/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/gettingstarted/Makefile b/packages/gtk2/examples/gettingstarted/Makefile
index 77533e5fdf..b9a67daf0c 100644
--- a/packages/gtk2/examples/gettingstarted/Makefile
+++ b/packages/gtk2/examples/gettingstarted/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/gtk_demo/Makefile b/packages/gtk2/examples/gtk_demo/Makefile
index 5ac4208739..7b7db6458d 100644
--- a/packages/gtk2/examples/gtk_demo/Makefile
+++ b/packages/gtk2/examples/gtk_demo/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/gtkglext/Makefile b/packages/gtk2/examples/gtkglext/Makefile
index 20c6990e01..e9802fa8dc 100644
--- a/packages/gtk2/examples/gtkglext/Makefile
+++ b/packages/gtk2/examples/gtkglext/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2768,8 +2769,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/helloworld/Makefile b/packages/gtk2/examples/helloworld/Makefile
index 35ab798393..a16454eab3 100644
--- a/packages/gtk2/examples/helloworld/Makefile
+++ b/packages/gtk2/examples/helloworld/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/helloworld2/Makefile b/packages/gtk2/examples/helloworld2/Makefile
index 6267e18a20..ae201b61d8 100644
--- a/packages/gtk2/examples/helloworld2/Makefile
+++ b/packages/gtk2/examples/helloworld2/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/plugins/Makefile b/packages/gtk2/examples/plugins/Makefile
index 7ccb65652a..66ce97a955 100644
--- a/packages/gtk2/examples/plugins/Makefile
+++ b/packages/gtk2/examples/plugins/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/gtk2/examples/scribble_simple/Makefile b/packages/gtk2/examples/scribble_simple/Makefile
index 8f31a5f526..c2910ee8c9 100644
--- a/packages/gtk2/examples/scribble_simple/Makefile
+++ b/packages/gtk2/examples/scribble_simple/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/hash/Makefile b/packages/hash/Makefile
index 26d98299e9..74ed1cbbf6 100644
--- a/packages/hash/Makefile
+++ b/packages/hash/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1546,8 +1547,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/hash/examples/Makefile b/packages/hash/examples/Makefile
index a17db731ee..198a8f78d7 100644
--- a/packages/hash/examples/Makefile
+++ b/packages/hash/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2768,8 +2769,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/hermes/Makefile b/packages/hermes/Makefile
index 51c97d4bed..353f0ef760 100644
--- a/packages/hermes/Makefile
+++ b/packages/hermes/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd13/Makefile b/packages/httpd13/Makefile
index 0c40c1155b..2301787b3e 100644
--- a/packages/httpd13/Makefile
+++ b/packages/httpd13/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd20/Makefile b/packages/httpd20/Makefile
index 0686a9bbe4..915cdb7307 100644
--- a/packages/httpd20/Makefile
+++ b/packages/httpd20/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd20/examples/Makefile b/packages/httpd20/examples/Makefile
index ce21e7244f..d768fe5f11 100644
--- a/packages/httpd20/examples/Makefile
+++ b/packages/httpd20/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd22/Makefile b/packages/httpd22/Makefile
index c9150f6082..1ef39d404d 100644
--- a/packages/httpd22/Makefile
+++ b/packages/httpd22/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd22/examples/Makefile b/packages/httpd22/examples/Makefile
index 1d9f126d27..6e76004682 100644
--- a/packages/httpd22/examples/Makefile
+++ b/packages/httpd22/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd24/Makefile b/packages/httpd24/Makefile
index eca2cedbcf..acaff16191 100644
--- a/packages/httpd24/Makefile
+++ b/packages/httpd24/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/httpd24/examples/Makefile b/packages/httpd24/examples/Makefile
index 314899c130..f20bc5b137 100644
--- a/packages/httpd24/examples/Makefile
+++ b/packages/httpd24/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ibase/Makefile b/packages/ibase/Makefile
index d829749458..aefaadae33 100644
--- a/packages/ibase/Makefile
+++ b/packages/ibase/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ibase/examples/Makefile b/packages/ibase/examples/Makefile
index fc2c1927cb..8680c86232 100644
--- a/packages/ibase/examples/Makefile
+++ b/packages/ibase/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/iconvenc/Makefile b/packages/iconvenc/Makefile
index adddb9009d..8dc32bc474 100644
--- a/packages/iconvenc/Makefile
+++ b/packages/iconvenc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/iconvenc/examples/Makefile b/packages/iconvenc/examples/Makefile
index 4d39af49ea..760f4b9fe8 100644
--- a/packages/iconvenc/examples/Makefile
+++ b/packages/iconvenc/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ide/Makefile b/packages/ide/Makefile
index 698329b260..e4fd4f8dcd 100644
--- a/packages/ide/Makefile
+++ b/packages/ide/Makefile
@@ -591,6 +591,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -602,7 +603,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2803,8 +2804,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ide/compiler/Makefile b/packages/ide/compiler/Makefile
index 091445d933..76cdb8d409 100644
--- a/packages/ide/compiler/Makefile
+++ b/packages/ide/compiler/Makefile
@@ -1799,6 +1799,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1810,7 +1811,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3561,8 +3562,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ide/fakegdb/Makefile b/packages/ide/fakegdb/Makefile
index 2e23ef7351..da393036ba 100644
--- a/packages/ide/fakegdb/Makefile
+++ b/packages/ide/fakegdb/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1811,8 +1812,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/imagemagick/Makefile b/packages/imagemagick/Makefile
index 82830305c7..c49208e73e 100644
--- a/packages/imagemagick/Makefile
+++ b/packages/imagemagick/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/imlib/Makefile b/packages/imlib/Makefile
index 07a76d6732..f6756b40b4 100644
--- a/packages/imlib/Makefile
+++ b/packages/imlib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/iosxlocale/Makefile b/packages/iosxlocale/Makefile
index 0f7adcf9e3..592918271f 100644
--- a/packages/iosxlocale/Makefile
+++ b/packages/iosxlocale/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/jni/Makefile b/packages/jni/Makefile
index e308da88cd..280c29e9db 100644
--- a/packages/jni/Makefile
+++ b/packages/jni/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ldap/Makefile b/packages/ldap/Makefile
index fe27ba68f9..724dcf782f 100644
--- a/packages/ldap/Makefile
+++ b/packages/ldap/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libc/Makefile b/packages/libc/Makefile
index 20d3a50a17..13873030b7 100644
--- a/packages/libc/Makefile
+++ b/packages/libc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libcups/Makefile b/packages/libcups/Makefile
index f9089f976e..3550d92faf 100644
--- a/packages/libcups/Makefile
+++ b/packages/libcups/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libcurl/Makefile b/packages/libcurl/Makefile
index e965a74ca9..23ddfd6d4f 100644
--- a/packages/libcurl/Makefile
+++ b/packages/libcurl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libcurl/examples/Makefile b/packages/libcurl/examples/Makefile
index 88a4f1f94d..1a6417049a 100644
--- a/packages/libcurl/examples/Makefile
+++ b/packages/libcurl/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libenet/Makefile b/packages/libenet/Makefile
index 6505cbfa55..e3b1825c21 100644
--- a/packages/libenet/Makefile
+++ b/packages/libenet/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libffi/Makefile b/packages/libffi/Makefile
index 4493427f04..3ff2ad34b8 100644
--- a/packages/libffi/Makefile
+++ b/packages/libffi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libfontconfig/Makefile b/packages/libfontconfig/Makefile
index 993b9f4c6d..a9b570f982 100644
--- a/packages/libfontconfig/Makefile
+++ b/packages/libfontconfig/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/Makefile b/packages/libgbafpc/Makefile
index 394f854579..e96642b9d3 100644
--- a/packages/libgbafpc/Makefile
+++ b/packages/libgbafpc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/Makefile b/packages/libgbafpc/examples/Makefile
index 1fd93f0627..458e556d10 100644
--- a/packages/libgbafpc/examples/Makefile
+++ b/packages/libgbafpc/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/audio/Makefile b/packages/libgbafpc/examples/audio/Makefile
index bea440056c..1293de3c7a 100644
--- a/packages/libgbafpc/examples/audio/Makefile
+++ b/packages/libgbafpc/examples/audio/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2633,8 +2634,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/audio/PlayBoyScout/Makefile b/packages/libgbafpc/examples/audio/PlayBoyScout/Makefile
index 95eff37bb3..ee1549547b 100644
--- a/packages/libgbafpc/examples/audio/PlayBoyScout/Makefile
+++ b/packages/libgbafpc/examples/audio/PlayBoyScout/Makefile
@@ -1470,6 +1470,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1481,7 +1482,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3232,8 +3233,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/graphics/Makefile b/packages/libgbafpc/examples/graphics/Makefile
index d7c445cba8..448aa74aaa 100644
--- a/packages/libgbafpc/examples/graphics/Makefile
+++ b/packages/libgbafpc/examples/graphics/Makefile
@@ -871,6 +871,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -882,7 +883,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2633,8 +2634,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/graphics/PCXView/Makefile b/packages/libgbafpc/examples/graphics/PCXView/Makefile
index e4fcf197c0..97ec567f16 100644
--- a/packages/libgbafpc/examples/graphics/PCXView/Makefile
+++ b/packages/libgbafpc/examples/graphics/PCXView/Makefile
@@ -1470,6 +1470,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1481,7 +1482,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3232,8 +3233,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/graphics/SimpleBGScroll/Makefile b/packages/libgbafpc/examples/graphics/SimpleBGScroll/Makefile
index 9f57f2f423..96acfa8749 100644
--- a/packages/libgbafpc/examples/graphics/SimpleBGScroll/Makefile
+++ b/packages/libgbafpc/examples/graphics/SimpleBGScroll/Makefile
@@ -1470,6 +1470,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1481,7 +1482,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3232,8 +3233,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/graphics/ansi_console/Makefile b/packages/libgbafpc/examples/graphics/ansi_console/Makefile
index c4f86231d4..18fd899e8c 100644
--- a/packages/libgbafpc/examples/graphics/ansi_console/Makefile
+++ b/packages/libgbafpc/examples/graphics/ansi_console/Makefile
@@ -1470,6 +1470,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1481,7 +1482,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3232,8 +3233,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgbafpc/examples/template/Makefile b/packages/libgbafpc/examples/template/Makefile
index 50576f9012..aa6cbf4f01 100644
--- a/packages/libgbafpc/examples/template/Makefile
+++ b/packages/libgbafpc/examples/template/Makefile
@@ -1472,6 +1472,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1483,7 +1484,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3234,8 +3235,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgc/Makefile b/packages/libgc/Makefile
index d8da6cae0d..0f3081abdb 100644
--- a/packages/libgc/Makefile
+++ b/packages/libgc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgd/Makefile b/packages/libgd/Makefile
index 85fe9fddd3..2777d589e4 100644
--- a/packages/libgd/Makefile
+++ b/packages/libgd/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libgd/examples/Makefile b/packages/libgd/examples/Makefile
index c4f8f4225f..2580820fd2 100644
--- a/packages/libgd/examples/Makefile
+++ b/packages/libgd/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libmagic/Makefile b/packages/libmagic/Makefile
index 646ec87884..bb0ded25b9 100644
--- a/packages/libmagic/Makefile
+++ b/packages/libmagic/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libmicrohttpd/Makefile b/packages/libmicrohttpd/Makefile
index 0064f180bc..6cd3c75c26 100644
--- a/packages/libmicrohttpd/Makefile
+++ b/packages/libmicrohttpd/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/Makefile b/packages/libndsfpc/Makefile
index 7c20ca8c14..133abded97 100644
--- a/packages/libndsfpc/Makefile
+++ b/packages/libndsfpc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/Makefile b/packages/libndsfpc/examples/Makefile
index b84a6a484f..53caa2b8b2 100644
--- a/packages/libndsfpc/examples/Makefile
+++ b/packages/libndsfpc/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/Makefile b/packages/libndsfpc/examples/audio/Makefile
index b090f9c8e1..18cf68af2e 100644
--- a/packages/libndsfpc/examples/audio/Makefile
+++ b/packages/libndsfpc/examples/audio/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/Makefile b/packages/libndsfpc/examples/audio/maxmod/Makefile
index 2b3134e429..45f641e0d3 100644
--- a/packages/libndsfpc/examples/audio/maxmod/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile b/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
index 277c4e6eac..e3ad1ba107 100644
--- a/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/audio_modes/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/basic_sound/Makefile b/packages/libndsfpc/examples/audio/maxmod/basic_sound/Makefile
index bb0568fab4..5b3e48825e 100644
--- a/packages/libndsfpc/examples/audio/maxmod/basic_sound/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/basic_sound/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/reverb/Makefile b/packages/libndsfpc/examples/audio/maxmod/reverb/Makefile
index 2af27e5970..26ad32271c 100644
--- a/packages/libndsfpc/examples/audio/maxmod/reverb/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/reverb/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/song_events_example/Makefile b/packages/libndsfpc/examples/audio/maxmod/song_events_example/Makefile
index 2f7eb37d81..655e7f42e0 100644
--- a/packages/libndsfpc/examples/audio/maxmod/song_events_example/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/song_events_example/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/song_events_example2/Makefile b/packages/libndsfpc/examples/audio/maxmod/song_events_example2/Makefile
index 982ddda803..a380ad0e42 100644
--- a/packages/libndsfpc/examples/audio/maxmod/song_events_example2/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/song_events_example2/Makefile
@@ -2663,6 +2663,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2674,7 +2675,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4425,8 +4426,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/maxmod/streaming/Makefile b/packages/libndsfpc/examples/audio/maxmod/streaming/Makefile
index 334c5eac35..74e0fad9a1 100644
--- a/packages/libndsfpc/examples/audio/maxmod/streaming/Makefile
+++ b/packages/libndsfpc/examples/audio/maxmod/streaming/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/audio/micrecord/Makefile b/packages/libndsfpc/examples/audio/micrecord/Makefile
index f551d418f6..60a3164e9d 100644
--- a/packages/libndsfpc/examples/audio/micrecord/Makefile
+++ b/packages/libndsfpc/examples/audio/micrecord/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/card/Makefile b/packages/libndsfpc/examples/card/Makefile
index e08193768c..9661675f3a 100644
--- a/packages/libndsfpc/examples/card/Makefile
+++ b/packages/libndsfpc/examples/card/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/card/eeprom/Makefile b/packages/libndsfpc/examples/card/eeprom/Makefile
index 853dbbcded..f0ae5ef0d3 100644
--- a/packages/libndsfpc/examples/card/eeprom/Makefile
+++ b/packages/libndsfpc/examples/card/eeprom/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/debugging/Makefile b/packages/libndsfpc/examples/debugging/Makefile
index b3cb86811a..7970ca0d0d 100644
--- a/packages/libndsfpc/examples/debugging/Makefile
+++ b/packages/libndsfpc/examples/debugging/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/debugging/exceptionTest/Makefile b/packages/libndsfpc/examples/debugging/exceptionTest/Makefile
index 2b06f38669..e4cea5aa97 100644
--- a/packages/libndsfpc/examples/debugging/exceptionTest/Makefile
+++ b/packages/libndsfpc/examples/debugging/exceptionTest/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/ds_motion/Makefile b/packages/libndsfpc/examples/ds_motion/Makefile
index 7c9e1ef1df..027b43a680 100644
--- a/packages/libndsfpc/examples/ds_motion/Makefile
+++ b/packages/libndsfpc/examples/ds_motion/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/dswifi/Makefile b/packages/libndsfpc/examples/dswifi/Makefile
index 8985ff4ec6..3a6b756b84 100644
--- a/packages/libndsfpc/examples/dswifi/Makefile
+++ b/packages/libndsfpc/examples/dswifi/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/dswifi/ap_search/Makefile b/packages/libndsfpc/examples/dswifi/ap_search/Makefile
index 0848588276..cf253f1e37 100644
--- a/packages/libndsfpc/examples/dswifi/ap_search/Makefile
+++ b/packages/libndsfpc/examples/dswifi/ap_search/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/dswifi/autoconnect/Makefile b/packages/libndsfpc/examples/dswifi/autoconnect/Makefile
index fb813687b0..590a1152c4 100644
--- a/packages/libndsfpc/examples/dswifi/autoconnect/Makefile
+++ b/packages/libndsfpc/examples/dswifi/autoconnect/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/dswifi/httpget/Makefile b/packages/libndsfpc/examples/dswifi/httpget/Makefile
index ef57203988..1a9f0525f6 100644
--- a/packages/libndsfpc/examples/dswifi/httpget/Makefile
+++ b/packages/libndsfpc/examples/dswifi/httpget/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/Makefile b/packages/libndsfpc/examples/filesystem/Makefile
index fc21f11736..69fc2b7065 100644
--- a/packages/libndsfpc/examples/filesystem/Makefile
+++ b/packages/libndsfpc/examples/filesystem/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/embedded_gbfs/Makefile b/packages/libndsfpc/examples/filesystem/embedded_gbfs/Makefile
index 0d382046d0..208cd7f665 100644
--- a/packages/libndsfpc/examples/filesystem/embedded_gbfs/Makefile
+++ b/packages/libndsfpc/examples/filesystem/embedded_gbfs/Makefile
@@ -2662,6 +2662,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2673,7 +2674,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4424,8 +4425,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/libfat/Makefile b/packages/libndsfpc/examples/filesystem/libfat/Makefile
index db157a5f18..54a15d432c 100644
--- a/packages/libndsfpc/examples/filesystem/libfat/Makefile
+++ b/packages/libndsfpc/examples/filesystem/libfat/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/libfat/access_dir/Makefile b/packages/libndsfpc/examples/filesystem/libfat/access_dir/Makefile
index 04604935b3..f865e4b8ef 100644
--- a/packages/libndsfpc/examples/filesystem/libfat/access_dir/Makefile
+++ b/packages/libndsfpc/examples/filesystem/libfat/access_dir/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/libfat/access_file/Makefile b/packages/libndsfpc/examples/filesystem/libfat/access_file/Makefile
index 5b401a2778..f554db0ca0 100644
--- a/packages/libndsfpc/examples/filesystem/libfat/access_file/Makefile
+++ b/packages/libndsfpc/examples/filesystem/libfat/access_file/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/libfat/libfatdir/Makefile b/packages/libndsfpc/examples/filesystem/libfat/libfatdir/Makefile
index 8267653b6c..354e8226bc 100644
--- a/packages/libndsfpc/examples/filesystem/libfat/libfatdir/Makefile
+++ b/packages/libndsfpc/examples/filesystem/libfat/libfatdir/Makefile
@@ -2364,6 +2364,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2375,7 +2376,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4126,8 +4127,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/nitrofs/Makefile b/packages/libndsfpc/examples/filesystem/nitrofs/Makefile
index 4dab98a163..1f65486301 100644
--- a/packages/libndsfpc/examples/filesystem/nitrofs/Makefile
+++ b/packages/libndsfpc/examples/filesystem/nitrofs/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/filesystem/nitrofs/nitrodir/Makefile b/packages/libndsfpc/examples/filesystem/nitrofs/nitrodir/Makefile
index d27762e978..8df8676b02 100644
--- a/packages/libndsfpc/examples/filesystem/nitrofs/nitrodir/Makefile
+++ b/packages/libndsfpc/examples/filesystem/nitrofs/nitrodir/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/2Dplus3D/Makefile b/packages/libndsfpc/examples/gl2d/2Dplus3D/Makefile
index 5e8f81eaf7..dcd271feec 100644
--- a/packages/libndsfpc/examples/gl2d/2Dplus3D/Makefile
+++ b/packages/libndsfpc/examples/gl2d/2Dplus3D/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/Makefile b/packages/libndsfpc/examples/gl2d/Makefile
index 77c35a0068..6517de4e79 100644
--- a/packages/libndsfpc/examples/gl2d/Makefile
+++ b/packages/libndsfpc/examples/gl2d/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/dual_screen/Makefile b/packages/libndsfpc/examples/gl2d/dual_screen/Makefile
index acca78cb68..aee1c3de55 100644
--- a/packages/libndsfpc/examples/gl2d/dual_screen/Makefile
+++ b/packages/libndsfpc/examples/gl2d/dual_screen/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/fonts/Makefile b/packages/libndsfpc/examples/gl2d/fonts/Makefile
index 820b46d067..12931fad95 100644
--- a/packages/libndsfpc/examples/gl2d/fonts/Makefile
+++ b/packages/libndsfpc/examples/gl2d/fonts/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/primitives/Makefile b/packages/libndsfpc/examples/gl2d/primitives/Makefile
index 15ccf518d9..60d851823d 100644
--- a/packages/libndsfpc/examples/gl2d/primitives/Makefile
+++ b/packages/libndsfpc/examples/gl2d/primitives/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/scrolling/Makefile b/packages/libndsfpc/examples/gl2d/scrolling/Makefile
index a52d7833ad..1950c3798b 100644
--- a/packages/libndsfpc/examples/gl2d/scrolling/Makefile
+++ b/packages/libndsfpc/examples/gl2d/scrolling/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/gl2d/sprites/Makefile b/packages/libndsfpc/examples/gl2d/sprites/Makefile
index 61abdbe02a..3167e597b7 100644
--- a/packages/libndsfpc/examples/gl2d/sprites/Makefile
+++ b/packages/libndsfpc/examples/gl2d/sprites/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/3D_Both_Screens/Makefile b/packages/libndsfpc/examples/graphics/3D/3D_Both_Screens/Makefile
index 3a4f9ce149..e4f67926c2 100644
--- a/packages/libndsfpc/examples/graphics/3D/3D_Both_Screens/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/3D_Both_Screens/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/BoxTest/Makefile b/packages/libndsfpc/examples/graphics/3D/BoxTest/Makefile
index c64d1bc2c4..54dabcac3b 100644
--- a/packages/libndsfpc/examples/graphics/3D/BoxTest/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/BoxTest/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Display_List/Makefile b/packages/libndsfpc/examples/graphics/3D/Display_List/Makefile
index 974c841aed..76574918b8 100644
--- a/packages/libndsfpc/examples/graphics/3D/Display_List/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Display_List/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Display_List_2/Makefile b/packages/libndsfpc/examples/graphics/3D/Display_List_2/Makefile
index 14cbe17956..64f7fba748 100644
--- a/packages/libndsfpc/examples/graphics/3D/Display_List_2/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Display_List_2/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Env_Mapping/Makefile b/packages/libndsfpc/examples/graphics/3D/Env_Mapping/Makefile
index c323fd03f4..825fb9c564 100644
--- a/packages/libndsfpc/examples/graphics/3D/Env_Mapping/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Env_Mapping/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Makefile b/packages/libndsfpc/examples/graphics/3D/Makefile
index e349c413b0..e414dc106d 100644
--- a/packages/libndsfpc/examples/graphics/3D/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Mixed_Text_3D/Makefile b/packages/libndsfpc/examples/graphics/3D/Mixed_Text_3D/Makefile
index 1c422edbc2..056ccda205 100644
--- a/packages/libndsfpc/examples/graphics/3D/Mixed_Text_3D/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Mixed_Text_3D/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Ortho/Makefile b/packages/libndsfpc/examples/graphics/3D/Ortho/Makefile
index 89ca57a866..3baf41faa5 100644
--- a/packages/libndsfpc/examples/graphics/3D/Ortho/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Ortho/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Paletted_Cube/Makefile b/packages/libndsfpc/examples/graphics/3D/Paletted_Cube/Makefile
index 7d73c5ddaa..cf0d0d6390 100644
--- a/packages/libndsfpc/examples/graphics/3D/Paletted_Cube/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Paletted_Cube/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Picking/Makefile b/packages/libndsfpc/examples/graphics/3D/Picking/Makefile
index 0b12aad9f5..7b0a0c51ba 100644
--- a/packages/libndsfpc/examples/graphics/3D/Picking/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Picking/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Simple_Quad/Makefile b/packages/libndsfpc/examples/graphics/3D/Simple_Quad/Makefile
index 0912e00298..b140bc215e 100644
--- a/packages/libndsfpc/examples/graphics/3D/Simple_Quad/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Simple_Quad/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Simple_Tri/Makefile b/packages/libndsfpc/examples/graphics/3D/Simple_Tri/Makefile
index f1df49c5ba..64f10e42d5 100644
--- a/packages/libndsfpc/examples/graphics/3D/Simple_Tri/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Simple_Tri/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Textured_Cube/Makefile b/packages/libndsfpc/examples/graphics/3D/Textured_Cube/Makefile
index 32a451a573..18cd71f959 100644
--- a/packages/libndsfpc/examples/graphics/3D/Textured_Cube/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Textured_Cube/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Textured_Quad/Makefile b/packages/libndsfpc/examples/graphics/3D/Textured_Quad/Makefile
index caaa3e066e..1b4be9eef3 100644
--- a/packages/libndsfpc/examples/graphics/3D/Textured_Quad/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Textured_Quad/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/Toon_Shading/Makefile b/packages/libndsfpc/examples/graphics/3D/Toon_Shading/Makefile
index b1f44f4910..0cf3446dd2 100644
--- a/packages/libndsfpc/examples/graphics/3D/Toon_Shading/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/Toon_Shading/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/Makefile
index 6302fb0d0f..6e881e4ca7 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson01/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson01/Makefile
index 6ee8463096..366b2a7310 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson01/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson01/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson02/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson02/Makefile
index a2da5553a6..14dc1a6b89 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson02/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson02/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson03/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson03/Makefile
index 35e599b596..5956756a5f 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson03/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson03/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson04/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson04/Makefile
index d59ab895ca..799d8d1db2 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson04/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson04/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson05/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson05/Makefile
index a085cf6ad1..f452450e72 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson05/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson05/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson06/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson06/Makefile
index 2f82bcb6a2..fa0e5bf7d0 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson06/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson06/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson07/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson07/Makefile
index cacfaa7637..314e5fbddf 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson07/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson07/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson08/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson08/Makefile
index 0cbf14b0ac..7cd56d1ea2 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson08/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson08/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson09/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson09/Makefile
index 88de3ddce3..83b50f9482 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson09/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson09/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson10/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson10/Makefile
index 53edefa359..9884b232cd 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson10/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson10/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson10b/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson10b/Makefile
index 25a2f40d59..34bcb9a47e 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson10b/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson10b/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/3D/nehe/lesson11/Makefile b/packages/libndsfpc/examples/graphics/3D/nehe/lesson11/Makefile
index 375fca779a..816f2788e5 100644
--- a/packages/libndsfpc/examples/graphics/3D/nehe/lesson11/Makefile
+++ b/packages/libndsfpc/examples/graphics/3D/nehe/lesson11/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/16bit_color_bmp/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/16bit_color_bmp/Makefile
index 4dd090be48..7ee5b1c605 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/16bit_color_bmp/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/16bit_color_bmp/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/256_color_bmp/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/256_color_bmp/Makefile
index 63c94f0361..d7ca45b6bc 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/256_color_bmp/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/256_color_bmp/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/Double_Buffer/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/Double_Buffer/Makefile
index e32fa699b6..d18b871bb2 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/Double_Buffer/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/Double_Buffer/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/Makefile
index 76f852ce0a..246aa8ae20 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/all_in_one/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/all_in_one/Makefile
index d1f2ee93dd..1a66b9bc14 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/all_in_one/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/all_in_one/Makefile
@@ -2367,6 +2367,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2378,7 +2379,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4129,8 +4130,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Backgrounds/rotation/Makefile b/packages/libndsfpc/examples/graphics/Backgrounds/rotation/Makefile
index 811a5101ac..f30f5a3284 100644
--- a/packages/libndsfpc/examples/graphics/Backgrounds/rotation/Makefile
+++ b/packages/libndsfpc/examples/graphics/Backgrounds/rotation/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Effects/Makefile b/packages/libndsfpc/examples/graphics/Effects/Makefile
index fb58121e2f..005b172a32 100644
--- a/packages/libndsfpc/examples/graphics/Effects/Makefile
+++ b/packages/libndsfpc/examples/graphics/Effects/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Effects/windows/Makefile b/packages/libndsfpc/examples/graphics/Effects/windows/Makefile
index fec5b19e2e..d0cfef5941 100644
--- a/packages/libndsfpc/examples/graphics/Effects/windows/Makefile
+++ b/packages/libndsfpc/examples/graphics/Effects/windows/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Ext_Palettes/Makefile b/packages/libndsfpc/examples/graphics/Ext_Palettes/Makefile
index 1c289c4d94..327c15f30c 100644
--- a/packages/libndsfpc/examples/graphics/Ext_Palettes/Makefile
+++ b/packages/libndsfpc/examples/graphics/Ext_Palettes/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Ext_Palettes/backgrounds/Makefile b/packages/libndsfpc/examples/graphics/Ext_Palettes/backgrounds/Makefile
index ebae6c2aaa..a6fda827af 100644
--- a/packages/libndsfpc/examples/graphics/Ext_Palettes/backgrounds/Makefile
+++ b/packages/libndsfpc/examples/graphics/Ext_Palettes/backgrounds/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Makefile b/packages/libndsfpc/examples/graphics/Makefile
index 07c0f1d7b5..728910d8d4 100644
--- a/packages/libndsfpc/examples/graphics/Makefile
+++ b/packages/libndsfpc/examples/graphics/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/Makefile b/packages/libndsfpc/examples/graphics/Printing/Makefile
index 7cff5b1dc4..d205230d1d 100644
--- a/packages/libndsfpc/examples/graphics/Printing/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/ansi_console/Makefile b/packages/libndsfpc/examples/graphics/Printing/ansi_console/Makefile
index 100b9bab2e..3280472c29 100644
--- a/packages/libndsfpc/examples/graphics/Printing/ansi_console/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/ansi_console/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/console_windows/Makefile b/packages/libndsfpc/examples/graphics/Printing/console_windows/Makefile
index ed0239ce31..008dc084cb 100644
--- a/packages/libndsfpc/examples/graphics/Printing/console_windows/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/console_windows/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile b/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
index d178dba416..552a94912b 100644
--- a/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/custom_font/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/print_both_screens/Makefile b/packages/libndsfpc/examples/graphics/Printing/print_both_screens/Makefile
index ceef476c5d..cb821cd644 100644
--- a/packages/libndsfpc/examples/graphics/Printing/print_both_screens/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/print_both_screens/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Printing/rotscale_text/Makefile b/packages/libndsfpc/examples/graphics/Printing/rotscale_text/Makefile
index e4a8d74a6d..808683e4f1 100644
--- a/packages/libndsfpc/examples/graphics/Printing/rotscale_text/Makefile
+++ b/packages/libndsfpc/examples/graphics/Printing/rotscale_text/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/Makefile b/packages/libndsfpc/examples/graphics/Sprites/Makefile
index 82295897b6..72fd57340e 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/allocation_test/Makefile b/packages/libndsfpc/examples/graphics/Sprites/allocation_test/Makefile
index 8a360c4e10..58008eb28f 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/allocation_test/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/allocation_test/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/animate_simple/Makefile b/packages/libndsfpc/examples/graphics/Sprites/animate_simple/Makefile
index 32d162e26c..54d95f4ffd 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/animate_simple/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/animate_simple/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/bitmap_sprites/Makefile b/packages/libndsfpc/examples/graphics/Sprites/bitmap_sprites/Makefile
index f368effa06..b82d3cc7c3 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/bitmap_sprites/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/bitmap_sprites/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/fire_and_sprites/Makefile b/packages/libndsfpc/examples/graphics/Sprites/fire_and_sprites/Makefile
index ce1b9b614c..abffd99522 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/fire_and_sprites/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/fire_and_sprites/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/simple/Makefile b/packages/libndsfpc/examples/graphics/Sprites/simple/Makefile
index c71cfeba11..0b6aa4c43a 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/simple/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/simple/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/sprite_extended_palettes/Makefile b/packages/libndsfpc/examples/graphics/Sprites/sprite_extended_palettes/Makefile
index 0da26e5c95..c40498136b 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/sprite_extended_palettes/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/sprite_extended_palettes/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/Sprites/sprite_rotate/Makefile b/packages/libndsfpc/examples/graphics/Sprites/sprite_rotate/Makefile
index 2635023ddd..7e7601beaa 100644
--- a/packages/libndsfpc/examples/graphics/Sprites/sprite_rotate/Makefile
+++ b/packages/libndsfpc/examples/graphics/Sprites/sprite_rotate/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/grit/256colorTilemap/Makefile b/packages/libndsfpc/examples/graphics/grit/256colorTilemap/Makefile
index ac09a5e4ce..f381d3452a 100644
--- a/packages/libndsfpc/examples/graphics/grit/256colorTilemap/Makefile
+++ b/packages/libndsfpc/examples/graphics/grit/256colorTilemap/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/graphics/grit/Makefile b/packages/libndsfpc/examples/graphics/grit/Makefile
index d1aaee0779..28c98cc58c 100644
--- a/packages/libndsfpc/examples/graphics/grit/Makefile
+++ b/packages/libndsfpc/examples/graphics/grit/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/hello_world/Makefile b/packages/libndsfpc/examples/hello_world/Makefile
index 59215b40d7..dabd1a01aa 100644
--- a/packages/libndsfpc/examples/hello_world/Makefile
+++ b/packages/libndsfpc/examples/hello_world/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/Makefile b/packages/libndsfpc/examples/input/Makefile
index d62a6b427c..26fd0e0049 100644
--- a/packages/libndsfpc/examples/input/Makefile
+++ b/packages/libndsfpc/examples/input/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/Touch_Pad/Makefile b/packages/libndsfpc/examples/input/Touch_Pad/Makefile
index a93ea98045..4ec471987e 100644
--- a/packages/libndsfpc/examples/input/Touch_Pad/Makefile
+++ b/packages/libndsfpc/examples/input/Touch_Pad/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/Touch_Pad/touch_area/Makefile b/packages/libndsfpc/examples/input/Touch_Pad/touch_area/Makefile
index 33a65e0a69..dbfa58b45c 100644
--- a/packages/libndsfpc/examples/input/Touch_Pad/touch_area/Makefile
+++ b/packages/libndsfpc/examples/input/Touch_Pad/touch_area/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/Touch_Pad/touch_look/Makefile b/packages/libndsfpc/examples/input/Touch_Pad/touch_look/Makefile
index 9626112d78..d8f29f61d7 100644
--- a/packages/libndsfpc/examples/input/Touch_Pad/touch_look/Makefile
+++ b/packages/libndsfpc/examples/input/Touch_Pad/touch_look/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/Touch_Pad/touch_test/Makefile b/packages/libndsfpc/examples/input/Touch_Pad/touch_test/Makefile
index 0ceba60eb1..321891ef0f 100644
--- a/packages/libndsfpc/examples/input/Touch_Pad/touch_test/Makefile
+++ b/packages/libndsfpc/examples/input/Touch_Pad/touch_test/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/keyboard/Makefile b/packages/libndsfpc/examples/input/keyboard/Makefile
index 5823f6b0c1..dcd1ba048d 100644
--- a/packages/libndsfpc/examples/input/keyboard/Makefile
+++ b/packages/libndsfpc/examples/input/keyboard/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/keyboard/keyboard_async/Makefile b/packages/libndsfpc/examples/input/keyboard/keyboard_async/Makefile
index 2db214ffec..c54a80d00c 100644
--- a/packages/libndsfpc/examples/input/keyboard/keyboard_async/Makefile
+++ b/packages/libndsfpc/examples/input/keyboard/keyboard_async/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/input/keyboard/keyboard_stdin/Makefile b/packages/libndsfpc/examples/input/keyboard/keyboard_stdin/Makefile
index c8c5c3e750..3a80106a65 100644
--- a/packages/libndsfpc/examples/input/keyboard/keyboard_stdin/Makefile
+++ b/packages/libndsfpc/examples/input/keyboard/keyboard_stdin/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/time/Makefile b/packages/libndsfpc/examples/time/Makefile
index f1a6eb3684..55894b8b8e 100644
--- a/packages/libndsfpc/examples/time/Makefile
+++ b/packages/libndsfpc/examples/time/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/time/RealTimeClock/Makefile b/packages/libndsfpc/examples/time/RealTimeClock/Makefile
index 0240139080..af05177947 100644
--- a/packages/libndsfpc/examples/time/RealTimeClock/Makefile
+++ b/packages/libndsfpc/examples/time/RealTimeClock/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/time/stopwatch/Makefile b/packages/libndsfpc/examples/time/stopwatch/Makefile
index e660a491c0..ef428e7295 100644
--- a/packages/libndsfpc/examples/time/stopwatch/Makefile
+++ b/packages/libndsfpc/examples/time/stopwatch/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libndsfpc/examples/time/timercallback/Makefile b/packages/libndsfpc/examples/time/timercallback/Makefile
index 0d1d0b748c..b66b6c0b3d 100644
--- a/packages/libndsfpc/examples/time/timercallback/Makefile
+++ b/packages/libndsfpc/examples/time/timercallback/Makefile
@@ -2366,6 +2366,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2377,7 +2378,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -4128,8 +4129,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/Makefile b/packages/libogcfpc/Makefile
index 159ce770ea..3e4b1180f1 100644
--- a/packages/libogcfpc/Makefile
+++ b/packages/libogcfpc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/Makefile b/packages/libogcfpc/examples/Makefile
index 563e51f371..1f84fb5b77 100644
--- a/packages/libogcfpc/examples/Makefile
+++ b/packages/libogcfpc/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2768,8 +2769,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/audio/Makefile b/packages/libogcfpc/examples/audio/Makefile
index f02205d71e..3f69795583 100644
--- a/packages/libogcfpc/examples/audio/Makefile
+++ b/packages/libogcfpc/examples/audio/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2768,8 +2769,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/audio/modplay/Makefile b/packages/libogcfpc/examples/audio/modplay/Makefile
index 9fdb1fb62d..a86a376fb5 100644
--- a/packages/libogcfpc/examples/audio/modplay/Makefile
+++ b/packages/libogcfpc/examples/audio/modplay/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/audio/mp3player/Makefile b/packages/libogcfpc/examples/audio/mp3player/Makefile
index 2066e329ae..c5e154407d 100644
--- a/packages/libogcfpc/examples/audio/mp3player/Makefile
+++ b/packages/libogcfpc/examples/audio/mp3player/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3667,8 +3668,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/Makefile b/packages/libogcfpc/examples/devices/Makefile
index c8c3409125..e89a83f605 100644
--- a/packages/libogcfpc/examples/devices/Makefile
+++ b/packages/libogcfpc/examples/devices/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/network/Makefile b/packages/libogcfpc/examples/devices/network/Makefile
index 0a371f1c76..b853d66e88 100644
--- a/packages/libogcfpc/examples/devices/network/Makefile
+++ b/packages/libogcfpc/examples/devices/network/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/network/sockettest/Makefile b/packages/libogcfpc/examples/devices/network/sockettest/Makefile
index 2cb122a4b9..c776ab8215 100644
--- a/packages/libogcfpc/examples/devices/network/sockettest/Makefile
+++ b/packages/libogcfpc/examples/devices/network/sockettest/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/usbgecko/Makefile b/packages/libogcfpc/examples/devices/usbgecko/Makefile
index 8b9d695e2c..b3abe82850 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/Makefile
+++ b/packages/libogcfpc/examples/devices/usbgecko/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
index e9258b5549..8e734fd687 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
+++ b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
index dd1316e626..4471d7097c 100644
--- a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
+++ b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/devices/usbkeyboard/basic_stdin/Makefile b/packages/libogcfpc/examples/devices/usbkeyboard/basic_stdin/Makefile
index 149a9c2d21..868f224dcb 100644
--- a/packages/libogcfpc/examples/devices/usbkeyboard/basic_stdin/Makefile
+++ b/packages/libogcfpc/examples/devices/usbkeyboard/basic_stdin/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/filesystem/Makefile b/packages/libogcfpc/examples/filesystem/Makefile
index c7431adf3c..12fc974f96 100644
--- a/packages/libogcfpc/examples/filesystem/Makefile
+++ b/packages/libogcfpc/examples/filesystem/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/filesystem/directory/Makefile b/packages/libogcfpc/examples/filesystem/directory/Makefile
index 5a1b4f8b51..52c6d16fd6 100644
--- a/packages/libogcfpc/examples/filesystem/directory/Makefile
+++ b/packages/libogcfpc/examples/filesystem/directory/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/Makefile b/packages/libogcfpc/examples/graphics/Makefile
index ae61313fa0..42c16f0710 100644
--- a/packages/libogcfpc/examples/graphics/Makefile
+++ b/packages/libogcfpc/examples/graphics/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/Makefile b/packages/libogcfpc/examples/graphics/gx/Makefile
index 0ee447a871..4f9b16be25 100644
--- a/packages/libogcfpc/examples/graphics/gx/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
index ab8f44cab0..99d2bc2bda 100644
--- a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
index 92574cd448..552b6762f0 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
index 83c42ef9c9..0da4ed7e9a 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
index 6f11bb62a4..69ad19f16f 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
index eebcfd0ec1..2263fa8988 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
index 92d299d2f0..5271df7c6d 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
index 6642d7665d..b3cd93e443 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
index d2220a4e7a..afb1282e3d 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
index 4a927091eb..3ca9dba9ea 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
index 9f269978e7..4d2ba7c6d3 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
index bcb24274ae..8f378ac555 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/graphics/gx/triangle/Makefile b/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
index 74f1b084ee..f1dae1dca9 100644
--- a/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/triangle/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libogcfpc/examples/template/Makefile b/packages/libogcfpc/examples/template/Makefile
index 3a9ad78ff7..db903dbd40 100644
--- a/packages/libogcfpc/examples/template/Makefile
+++ b/packages/libogcfpc/examples/template/Makefile
@@ -1768,6 +1768,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1779,7 +1780,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3530,8 +3531,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libpng/Makefile b/packages/libpng/Makefile
index 333001933f..a08ab96b83 100644
--- a/packages/libpng/Makefile
+++ b/packages/libpng/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/librsvg/Makefile b/packages/librsvg/Makefile
index 34a31cc18a..346633fe22 100644
--- a/packages/librsvg/Makefile
+++ b/packages/librsvg/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libsee/Makefile b/packages/libsee/Makefile
index bed0a67457..2d17ebfc6c 100644
--- a/packages/libsee/Makefile
+++ b/packages/libsee/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libsee/examples/Makefile b/packages/libsee/examples/Makefile
index a7a3ef4243..0674b2b559 100644
--- a/packages/libsee/examples/Makefile
+++ b/packages/libsee/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libtar/Makefile b/packages/libtar/Makefile
index 6813d2abb5..30082556eb 100644
--- a/packages/libtar/Makefile
+++ b/packages/libtar/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1546,8 +1547,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libusb/Makefile b/packages/libusb/Makefile
index 7d19f98dca..a5ff3ecc67 100644
--- a/packages/libusb/Makefile
+++ b/packages/libusb/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libvlc/Makefile b/packages/libvlc/Makefile
index cf308b9f69..1ee63f472a 100644
--- a/packages/libvlc/Makefile
+++ b/packages/libvlc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libxml/Makefile b/packages/libxml/Makefile
index 913615068e..96faeb7cc9 100644
--- a/packages/libxml/Makefile
+++ b/packages/libxml/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/libxml/examples/Makefile b/packages/libxml/examples/Makefile
index eb074813e0..f5b6d897be 100644
--- a/packages/libxml/examples/Makefile
+++ b/packages/libxml/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1809,8 +1810,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/lua/Makefile b/packages/lua/Makefile
index 37a874b876..79969ac78d 100644
--- a/packages/lua/Makefile
+++ b/packages/lua/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/mad/Makefile b/packages/mad/Makefile
index 46ccfff7ab..09d0fe63ec 100644
--- a/packages/mad/Makefile
+++ b/packages/mad/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/matroska/Makefile b/packages/matroska/Makefile
index 138b5db02c..26f1a6f123 100644
--- a/packages/matroska/Makefile
+++ b/packages/matroska/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/modplug/Makefile b/packages/modplug/Makefile
index fb83c802d5..3a971a0159 100644
--- a/packages/modplug/Makefile
+++ b/packages/modplug/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/morphunits/Makefile b/packages/morphunits/Makefile
index ecc1b76d9a..312a2e29f3 100644
--- a/packages/morphunits/Makefile
+++ b/packages/morphunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/mysql/Makefile b/packages/mysql/Makefile
index e192038f77..65cf13522c 100644
--- a/packages/mysql/Makefile
+++ b/packages/mysql/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/mysql/examples/Makefile b/packages/mysql/examples/Makefile
index 3c54693e90..c3fa108e25 100644
--- a/packages/mysql/examples/Makefile
+++ b/packages/mysql/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ncurses/Makefile b/packages/ncurses/Makefile
index 6dae40311f..38f880ba6c 100644
--- a/packages/ncurses/Makefile
+++ b/packages/ncurses/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ncurses/examples/Makefile b/packages/ncurses/examples/Makefile
index b8d472e828..7c0b3aa843 100644
--- a/packages/ncurses/examples/Makefile
+++ b/packages/ncurses/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/newt/Makefile b/packages/newt/Makefile
index 8409262f28..40f2557caf 100644
--- a/packages/newt/Makefile
+++ b/packages/newt/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/newt/examples/Makefile b/packages/newt/examples/Makefile
index b7cb7cce7b..d6c78a3b6a 100644
--- a/packages/newt/examples/Makefile
+++ b/packages/newt/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/numlib/Makefile b/packages/numlib/Makefile
index d9e81a7d54..d180d564cc 100644
--- a/packages/numlib/Makefile
+++ b/packages/numlib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/numlib/examples/Makefile b/packages/numlib/examples/Makefile
index e4dde16134..ea1b837074 100644
--- a/packages/numlib/examples/Makefile
+++ b/packages/numlib/examples/Makefile
@@ -2355,6 +2355,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -2366,7 +2367,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3295,8 +3296,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/nvapi/Makefile b/packages/nvapi/Makefile
index 34ceae11d5..894ef11585 100644
--- a/packages/nvapi/Makefile
+++ b/packages/nvapi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/objcrtl/Makefile b/packages/objcrtl/Makefile
index b8691a6051..a9841e0bb9 100644
--- a/packages/objcrtl/Makefile
+++ b/packages/objcrtl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/odata/Makefile b/packages/odata/Makefile
index 0cd54bac63..bd58d3c34b 100644
--- a/packages/odata/Makefile
+++ b/packages/odata/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2481,8 +2482,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/odbc/Makefile b/packages/odbc/Makefile
index 4be4916198..b0435c2c6d 100644
--- a/packages/odbc/Makefile
+++ b/packages/odbc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/odbc/examples/Makefile b/packages/odbc/examples/Makefile
index 575f54ba6e..c69fc06b04 100644
--- a/packages/odbc/examples/Makefile
+++ b/packages/odbc/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/oggvorbis/Makefile b/packages/oggvorbis/Makefile
index feea17827e..69e263e697 100644
--- a/packages/oggvorbis/Makefile
+++ b/packages/oggvorbis/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/openal/Makefile b/packages/openal/Makefile
index 0b24890100..94a79b6943 100644
--- a/packages/openal/Makefile
+++ b/packages/openal/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/openal/examples/Makefile b/packages/openal/examples/Makefile
index 5b06d066a2..5482bf9faf 100644
--- a/packages/openal/examples/Makefile
+++ b/packages/openal/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3370,8 +3371,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/opencl/Makefile b/packages/opencl/Makefile
index 0f1d8346f9..d03b6b8c8d 100644
--- a/packages/opencl/Makefile
+++ b/packages/opencl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/opengl/Makefile b/packages/opengl/Makefile
index f8fd170b7c..89fa0c1631 100644
--- a/packages/opengl/Makefile
+++ b/packages/opengl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/opengl/examples/Makefile b/packages/opengl/examples/Makefile
index 62b3ddf4ff..9681434867 100644
--- a/packages/opengl/examples/Makefile
+++ b/packages/opengl/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/opengles/Makefile b/packages/opengles/Makefile
index 13b54a3b43..4439679898 100644
--- a/packages/opengles/Makefile
+++ b/packages/opengles/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/opengles/examples/Makefile b/packages/opengles/examples/Makefile
index 8e2ca1b20d..9726674879 100644
--- a/packages/opengles/examples/Makefile
+++ b/packages/opengles/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/openssl/Makefile b/packages/openssl/Makefile
index 747496321f..17f65c404d 100644
--- a/packages/openssl/Makefile
+++ b/packages/openssl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/oracle/Makefile b/packages/oracle/Makefile
index e0cf9741e0..703c5bda48 100644
--- a/packages/oracle/Makefile
+++ b/packages/oracle/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/oracle/examples/Makefile b/packages/oracle/examples/Makefile
index 8707557c95..5f3d354d6f 100644
--- a/packages/oracle/examples/Makefile
+++ b/packages/oracle/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3339,8 +3340,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/os2units/Makefile b/packages/os2units/Makefile
index 2c6c220a23..b5d6345d78 100644
--- a/packages/os2units/Makefile
+++ b/packages/os2units/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/os2units/examples/Makefile b/packages/os2units/examples/Makefile
index 7f2b36c54b..ec41006011 100644
--- a/packages/os2units/examples/Makefile
+++ b/packages/os2units/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/os4units/Makefile b/packages/os4units/Makefile
index 2702378c54..81b33fb2a1 100644
--- a/packages/os4units/Makefile
+++ b/packages/os4units/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/palmunits/Makefile b/packages/palmunits/Makefile
index b988cb27e4..f3ef9c393c 100644
--- a/packages/palmunits/Makefile
+++ b/packages/palmunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pasjpeg/Makefile b/packages/pasjpeg/Makefile
index 8acd8cf3c7..e17f874a13 100644
--- a/packages/pasjpeg/Makefile
+++ b/packages/pasjpeg/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pastojs/Makefile b/packages/pastojs/Makefile
index 31353b1b9f..21a252a31a 100644
--- a/packages/pastojs/Makefile
+++ b/packages/pastojs/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/paszlib/Makefile b/packages/paszlib/Makefile
index 6bb13ddf86..5e6763d432 100644
--- a/packages/paszlib/Makefile
+++ b/packages/paszlib/Makefile
@@ -606,6 +606,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -617,7 +618,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1546,8 +1547,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/paszlib/examples/Makefile b/packages/paszlib/examples/Makefile
index f95de7ec60..481a2a599c 100644
--- a/packages/paszlib/examples/Makefile
+++ b/packages/paszlib/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -1946,8 +1947,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pcap/Makefile b/packages/pcap/Makefile
index e4dda6e8c7..cdafd697f3 100644
--- a/packages/pcap/Makefile
+++ b/packages/pcap/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/postgres/Makefile b/packages/postgres/Makefile
index 16dba4f766..c474a06785 100644
--- a/packages/postgres/Makefile
+++ b/packages/postgres/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/postgres/examples/Makefile b/packages/postgres/examples/Makefile
index 69999ec2ca..58082a9364 100644
--- a/packages/postgres/examples/Makefile
+++ b/packages/postgres/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/proj4/Makefile b/packages/proj4/Makefile
index 4b3ed6fc4a..2f0562e8b4 100644
--- a/packages/proj4/Makefile
+++ b/packages/proj4/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ptc/Makefile b/packages/ptc/Makefile
index 1802fa4b82..83dad9681d 100644
--- a/packages/ptc/Makefile
+++ b/packages/ptc/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/ptc/examples/Makefile b/packages/ptc/examples/Makefile
index dad0961e9e..8da95654eb 100644
--- a/packages/ptc/examples/Makefile
+++ b/packages/ptc/examples/Makefile
@@ -1167,6 +1167,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1178,7 +1179,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -3121,8 +3122,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pthreads/Makefile b/packages/pthreads/Makefile
index ebe62d3d09..0de955ba60 100644
--- a/packages/pthreads/Makefile
+++ b/packages/pthreads/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pxlib/Makefile b/packages/pxlib/Makefile
index 56d01b2fb2..f80bb5a56e 100644
--- a/packages/pxlib/Makefile
+++ b/packages/pxlib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/pxlib/examples/Makefile b/packages/pxlib/examples/Makefile
index 342477256a..ae17ebed3f 100644
--- a/packages/pxlib/examples/Makefile
+++ b/packages/pxlib/examples/Makefile
@@ -677,6 +677,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -688,7 +689,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2439,8 +2440,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/regexpr/Makefile b/packages/regexpr/Makefile
index 8f9e82ceb2..869a0a5774 100644
--- a/packages/regexpr/Makefile
+++ b/packages/regexpr/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/regexpr/examples/Makefile b/packages/regexpr/examples/Makefile
index 9ecc611a83..481a6a2c4d 100644
--- a/packages/regexpr/examples/Makefile
+++ b/packages/regexpr/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rexx/Makefile b/packages/rexx/Makefile
index db39843d52..68cc1fd9b5 100644
--- a/packages/rexx/Makefile
+++ b/packages/rexx/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rexx/examples/Makefile b/packages/rexx/examples/Makefile
index e67d1018c7..e1a15920a0 100644
--- a/packages/rexx/examples/Makefile
+++ b/packages/rexx/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rtl-console/Makefile b/packages/rtl-console/Makefile
index 6d3e7e6587..0f948d3950 100644
--- a/packages/rtl-console/Makefile
+++ b/packages/rtl-console/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rtl-extra/Makefile b/packages/rtl-extra/Makefile
index c6997b1b74..e40f2e3a29 100644
--- a/packages/rtl-extra/Makefile
+++ b/packages/rtl-extra/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rtl-generics/Makefile b/packages/rtl-generics/Makefile
index c457ea46bc..1a13ba2a9f 100644
--- a/packages/rtl-generics/Makefile
+++ b/packages/rtl-generics/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rtl-objpas/Makefile b/packages/rtl-objpas/Makefile
index e081364dee..9f16e019b7 100644
--- a/packages/rtl-objpas/Makefile
+++ b/packages/rtl-objpas/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/rtl-unicode/Makefile b/packages/rtl-unicode/Makefile
index 7e2f69202e..7b81fbfc34 100644
--- a/packages/rtl-unicode/Makefile
+++ b/packages/rtl-unicode/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/sdl/Makefile b/packages/sdl/Makefile
index b7bf6213d2..5a993164bc 100644
--- a/packages/sdl/Makefile
+++ b/packages/sdl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/sndfile/Makefile b/packages/sndfile/Makefile
index 6fec783bbf..380f48a05f 100644
--- a/packages/sndfile/Makefile
+++ b/packages/sndfile/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/sqlite/Makefile b/packages/sqlite/Makefile
index 998f894e30..576c6d3d57 100644
--- a/packages/sqlite/Makefile
+++ b/packages/sqlite/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/svgalib/Makefile b/packages/svgalib/Makefile
index b73f83e9ea..5c705fcb9d 100644
--- a/packages/svgalib/Makefile
+++ b/packages/svgalib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/svgalib/examples/Makefile b/packages/svgalib/examples/Makefile
index 495379661b..660f002963 100644
--- a/packages/svgalib/examples/Makefile
+++ b/packages/svgalib/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/symbolic/Makefile b/packages/symbolic/Makefile
index d4348600a6..f281bb850d 100644
--- a/packages/symbolic/Makefile
+++ b/packages/symbolic/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/symbolic/examples/Makefile b/packages/symbolic/examples/Makefile
index 1e5a0b4b00..450e958082 100644
--- a/packages/symbolic/examples/Makefile
+++ b/packages/symbolic/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/syslog/Makefile b/packages/syslog/Makefile
index 0c79958b91..7d8a53726d 100644
--- a/packages/syslog/Makefile
+++ b/packages/syslog/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/syslog/examples/Makefile b/packages/syslog/examples/Makefile
index fa5f24593b..5208a46555 100644
--- a/packages/syslog/examples/Makefile
+++ b/packages/syslog/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/tcl/Makefile b/packages/tcl/Makefile
index 82e1c81e33..b3825571bb 100644
--- a/packages/tcl/Makefile
+++ b/packages/tcl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/tosunits/Makefile b/packages/tosunits/Makefile
index 29de9e589d..f97993bc98 100644
--- a/packages/tosunits/Makefile
+++ b/packages/tosunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/univint/Makefile b/packages/univint/Makefile
index a092ffc028..07dac0b7ab 100644
--- a/packages/univint/Makefile
+++ b/packages/univint/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/univint/examples/Makefile b/packages/univint/examples/Makefile
index 4b182e0b59..0353e54584 100644
--- a/packages/univint/examples/Makefile
+++ b/packages/univint/examples/Makefile
@@ -1166,6 +1166,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -1177,7 +1178,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2928,8 +2929,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/unixutil/Makefile b/packages/unixutil/Makefile
index b5f7a8bac2..90f200aa76 100644
--- a/packages/unixutil/Makefile
+++ b/packages/unixutil/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/unzip/Makefile b/packages/unzip/Makefile
index 642ef75e72..4ca5c41222 100644
--- a/packages/unzip/Makefile
+++ b/packages/unzip/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/users/Makefile b/packages/users/Makefile
index cd2790ae0f..bd131603d6 100644
--- a/packages/users/Makefile
+++ b/packages/users/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/users/examples/Makefile b/packages/users/examples/Makefile
index dfcdeef17e..76c01deb28 100644
--- a/packages/users/examples/Makefile
+++ b/packages/users/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/utmp/Makefile b/packages/utmp/Makefile
index ff7b79d859..cc0beca36d 100644
--- a/packages/utmp/Makefile
+++ b/packages/utmp/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/utmp/examples/Makefile b/packages/utmp/examples/Makefile
index b33307b0ca..5e06041233 100644
--- a/packages/utmp/examples/Makefile
+++ b/packages/utmp/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/uuid/Makefile b/packages/uuid/Makefile
index 306d18ae3f..0a2baec2d3 100644
--- a/packages/uuid/Makefile
+++ b/packages/uuid/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/uuid/examples/Makefile b/packages/uuid/examples/Makefile
index fc39d493ab..1c7614bb31 100644
--- a/packages/uuid/examples/Makefile
+++ b/packages/uuid/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/vcl-compat/Makefile b/packages/vcl-compat/Makefile
index be7baba79d..17db9a6f9a 100644
--- a/packages/vcl-compat/Makefile
+++ b/packages/vcl-compat/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2618,8 +2619,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/webidl/Makefile b/packages/webidl/Makefile
index 429d7a835f..c0870beb01 100644
--- a/packages/webidl/Makefile
+++ b/packages/webidl/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2481,8 +2482,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/winceunits/Makefile b/packages/winceunits/Makefile
index 04cc753c3c..c6798cd03b 100644
--- a/packages/winceunits/Makefile
+++ b/packages/winceunits/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/winunits-base/Makefile b/packages/winunits-base/Makefile
index 3fc05fdd68..3ed2b56f7e 100644
--- a/packages/winunits-base/Makefile
+++ b/packages/winunits-base/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/winunits-jedi/Makefile b/packages/winunits-jedi/Makefile
index 21e19ca48c..af07d6ea0f 100644
--- a/packages/winunits-jedi/Makefile
+++ b/packages/winunits-jedi/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/x11/Makefile b/packages/x11/Makefile
index 87ce72e03c..0ca6cff40b 100644
--- a/packages/x11/Makefile
+++ b/packages/x11/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/xforms/Makefile b/packages/xforms/Makefile
index 443833382b..11fffecf25 100644
--- a/packages/xforms/Makefile
+++ b/packages/xforms/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/xforms/examples/Makefile b/packages/xforms/examples/Makefile
index a8b53722c0..a110603cf5 100644
--- a/packages/xforms/examples/Makefile
+++ b/packages/xforms/examples/Makefile
@@ -869,6 +869,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -880,7 +881,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2631,8 +2632,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/zlib/Makefile b/packages/zlib/Makefile
index de32058b80..604f3c2ac7 100644
--- a/packages/zlib/Makefile
+++ b/packages/zlib/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif
diff --git a/packages/zorba/Makefile b/packages/zorba/Makefile
index b90c9bb26e..56db457d1a 100644
--- a/packages/zorba/Makefile
+++ b/packages/zorba/Makefile
@@ -582,6 +582,7 @@ endif
endif
endif
endif
+FPCMAKEGCCLIBDIR:=$(shell dirname `gcc -print-libgcc-file-name`)
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(CROSSGCC),)
@@ -593,7 +594,7 @@ ifdef inUnix
ifeq ($(OS_SOURCE),netbsd)
OTHERLIBDIR:=/usr/pkg/lib
endif
-export GCCLIBDIR OTHERLIBDIR
+export GCCLIBDIR FPCMAKEGCCLIBDIR OTHERLIBDIR
endif
BATCHEXT=.bat
LOADEREXT=.as
@@ -2207,8 +2208,12 @@ ifdef LINKSHARED
endif
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef FPCMAKEGCCLIBDIR
+override FPCMAKEOPT+=-Fl$(FPCMAKEGCCLIBDIR)
+else
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
+endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
endif