GNU binutils version 2.40 or newer support dynamic xtensa core configuration. It can be built with the following project: https://github.com/jcmvbkbc/xtensa-dynconfig/tree/original using xtensa configuration overlay of your specific core or one of the predefined cores available here: https://github.com/jcmvbkbc/xtensa-toolchain-build/tree/master/overlays/original
As an example the following script builds dynconfig library for the esp32s3:
git clone https://github.com/jcmvbkbc/xtensa-dynconfig -b original
git clone https://github.com/jcmvbkbc/config-esp32s3 esp32s3
make -C xtensa-dynconfig ORIG=1 CONF_DIR=`pwd` esp32s3.so
export XTENSA_GNU_CONFIG=`pwd`/xtensa-dynconfig/esp32s3.so
If you run the assembler with the XTENSA_GNU_CONFIG environment variable set as shown above it will generate fairly generic code for little-endian xtensa.