prjxray/lib
Carlos Venegas Arrabé 4e14c2d330
xilinx: declare the Configuration explicit specializations in the header
configuration.cc explicitly specializes
Configuration<Spartan6>::createType2ConfigurationPacketData and
Configuration<...>::createConfigurationPackage (Spartan6, Series7,
UltraScale, UltraScalePlus), but none of those specializations were
declared in configuration.h. The standard requires an explicit
specialization to be declared in every translation unit that uses it
([temp.expl.spec]); without the declaration, a TU calling
createType2ConfigurationPacketData for Spartan6 instantiates the
primary template — which is defined in this header — and emits its own
COMDAT copy of the symbol.

That copy collides with the strong definition from configuration.cc
when linking xc7frames2bit/xc7patch with mingw-w64 ld ("multiple
definition of ...createType2ConfigurationPacketData..."), which is why
Windows builds needed -Wl,--allow-multiple-definition. ELF linkers
happen to resolve the collision silently in favour of the strong
symbol, so Linux builds never noticed.

Declare all five specializations in the header so every user
references the single definition in configuration.cc. Verified with a
mingw-w64 cross build: the tools now link without the workaround
linker flag. No behaviour change on ELF.
2026-07-31 22:43:29 +02:00
..
include/prjxray xilinx: declare the Configuration explicit specializations in the header 2026-07-31 22:43:29 +02:00
test_data Add tools test 2020-12-01 15:48:12 +01:00
xilinx Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
CMakeLists.txt bitstream_tools: Add unit tests for Spartan6 2019-10-22 09:20:04 +02:00
big_endian_span_test.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
bit_ops_test.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
database.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
memory_mapped_file.cc remove MAP_POPULATE 2020-06-17 10:11:20 -07:00
memory_mapped_file_test.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
segbits_file_reader.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00
segbits_file_reader_test.cc Add licensing header to C++ source and header files 2020-05-26 07:33:12 -07:00