In a freestanding library we don't install the header, so don't try to include it unless it exists. Explicitly declare aligned alloc functions for freestanding, because doesn't declare them. PR libstdc++/92376 * include/bits/c++config: Only do PSTL config when the header is present, to fix freestanding. * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation functions if they were detected by configure. Tested powerpc64le-linux, committed to trunk. This needs to be backported too.