def METHOD_NAME(self):
    opt = FCompiler.METHOD_NAME(self)
    v = self.get_version()
    if v and v >= '8.0':
        opt.append('-nofor_main')
    if sys.platform == 'darwin':
        # Here, it's -dynamiclib
        try:
            idx = opt.index('-shared')
            opt.remove('-shared')
        except ValueError:
            idx = 0
        opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup']
    return opt