There is conditional code in glibc, mainly in the inline or "whole-file" assembler code, but also elsewhere.
PIC: things that are directly related to PIC vs non-PIC code generation.
SHARED: other aspects of whether something is destined for libc.a or for libc.so.
_LIBC: this is defined for the glibc build (for code shared with other projects). It is also defined when building the glibc testsuite.
_LIBC_TEST: this can be defined in glibc tests to enable testsuite specific behaviour in header files.