-howToAccessLabel dflags arch OSLinux DataReference lbl
- -- A dynamic label needs to be accessed via a symbol pointer.
- | labelDynamic (thisPackage dflags) lbl
- = AccessViaSymbolPtr
-
- -- For PowerPC32 -fPIC, we have to access even static data
- -- via a symbol pointer (see below for an explanation why
- -- PowerPC32 Linux is especially broken).
- | arch == ArchPPC
- , opt_PIC
- = AccessViaSymbolPtr
+howToAccessLabel dflags arch os DataReference lbl
+ | osElfTarget os
+ = case () of
+ -- A dynamic label needs to be accessed via a symbol pointer.
+ _ | labelDynamic (thisPackage dflags) lbl
+ -> AccessViaSymbolPtr
+
+ -- For PowerPC32 -fPIC, we have to access even static data
+ -- via a symbol pointer (see below for an explanation why
+ -- PowerPC32 Linux is especially broken).
+ | arch == ArchPPC
+ , opt_PIC
+ -> AccessViaSymbolPtr