* [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
@ 2010-12-24 0:32 Dave Korn
2011-01-21 5:45 ` [PING] " Dave Korn
2011-01-21 10:35 ` Paolo Bonzini
0 siblings, 2 replies; 6+ messages in thread
From: Dave Korn @ 2010-12-24 0:32 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]
Hi all,
PR40125(*) is about Windows DLLs getting installed to the wrong place in
cross-compilers. By convention on windows systems, DLLs live in $prefix/bin
rather than $prefix/lib, since windows doesn't have an equivalent of
LD_LIBRARY_PATH; all shared libs have to be in the regular PATH.
That's fine for a native compiler, but for a cross-compiler, the DLLs built
are target libraries, not host ones. It doesn't make sense to install them in
$prefix/$target/bin, because that contains host binaries. What does make
plenty of sense however is to install them somewhere under
$prefix/$target/lib, since that is chock-full of target binaries already,
libraries in particular, and following some discussion in the PR audit trail
we decided toolexeclibdir was the right place.
The attached patch implements this by defining a new SHLIB_xxx variable to
pass in libgcc.mvars that contains the name of the install directory, either
bindir or toolexeclibdir; this is set by choosing one of two t-makefile frags
in config.gcc. It also adds the standard stanza for computing toolexeclibdir
in libgcc's configure, as the definition wasn't yet available there.
gcc/ChangeLog:
2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40125
* config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*): Select suitable
t-dlldir{,-x} fragment for build and add it to tmake_file.
(i[34567]86-*-mingw* | x86_64-*-mingw*): Likewise.
* Makefile.in (libgcc.mvars): Also export SHLIB_DLLDIR to libgcc.
* config/i386/t-dlldir: New file.
(SHLIB_DLLDIR): Define.
* config/i386/t-dlldir-x: New file.
(SHLIB_DLLDIR): Define.
* config/i386/t-cygming: Error out if SHLIB_DLLDIR is not set.
(SHLIB_INSTALL): Use it.
libgcc/ChangeLog:
2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40125
* configure.ac: Call ACX_NONCANONICAL_TARGET.
(toolexecdir): Calculate and AC_SUBST.
(toolexeclibdir): Likewise.
* Makefile.in (target_noncanonical): Import.
(toolexecdir): Likewise.
(toolexeclibdir): Likewise.
* configure: Regenerate.
Tested by building and installing (to a DESTDIR) i686-pc-cygwin native, and
i686-pc-cygwin x i686-pc-mingw32 cross-compilers, and verifying that the DLLs
all got installed to the correct locations. OK?
cheers,
DaveK
--
(*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40125
[-- Attachment #2: pr40125-libgcc.diff --]
[-- Type: text/x-c, Size: 8947 bytes --]
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 167484)
+++ gcc/config.gcc (working copy)
@@ -1421,7 +1421,13 @@ i[34567]86-*-pe | i[34567]86-*-cygwin*)
else
tmake_eh_file="i386/t-sjlj-eh"
fi
- tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming i386/t-cygwin"
+ # Shared libgcc DLL install dir depends on cross/native build.
+ if test x${host} = x${target} ; then
+ tmake_dlldir_file="i386/t-dlldir"
+ else
+ tmake_dlldir_file="i386/t-dlldir-x"
+ fi
+ tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming i386/t-cygwin"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
extra_options="${extra_options} i386/cygming.opt"
extra_objs="winnt.o winnt-stubs.o"
@@ -1477,7 +1483,13 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
else
tmake_eh_file="i386/t-sjlj-eh"
fi
- tmake_file="${tmake_file} ${tmake_eh_file} i386/t-cygming t-dfprules"
+ # Shared libgcc DLL install dir depends on cross/native build.
+ if test x${host} = x${target} ; then
+ tmake_dlldir_file="i386/t-dlldir"
+ else
+ tmake_dlldir_file="i386/t-dlldir-x"
+ fi
+ tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming t-dfprules"
case ${target} in
x86_64-w64-*)
tmake_file="${tmake_file} i386/t-mingw-w64"
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 167484)
+++ gcc/Makefile.in (working copy)
@@ -1914,6 +1914,7 @@ libgcc.mvars: config.status Makefile $(LIB2ADD) $(
echo GCC_EXTRA_PARTS = '$(GCC_EXTRA_PARTS)' >> tmp-libgcc.mvars
echo SHLIB_LINK = '$(subst $(GCC_FOR_TARGET),$$(GCC_FOR_TARGET),$(SHLIB_LINK))' >> tmp-libgcc.mvars
echo SHLIB_INSTALL = '$(SHLIB_INSTALL)' >> tmp-libgcc.mvars
+ echo SHLIB_DLLDIR = '$(SHLIB_DLLDIR)' >> tmp-libgcc.mvars
echo SHLIB_EXT = '$(SHLIB_EXT)' >> tmp-libgcc.mvars
echo SHLIB_MKMAP = '$(call srcdirify,$(SHLIB_MKMAP))' >> tmp-libgcc.mvars
echo SHLIB_MKMAP_OPTS = '$(SHLIB_MKMAP_OPTS)' >> tmp-libgcc.mvars
Index: gcc/config/i386/t-cygming
===================================================================
--- gcc/config/i386/t-cygming (revision 167484)
+++ gcc/config/i386/t-cygming (working copy)
@@ -72,6 +72,11 @@ SHLIB_MAP = @shlib_map_file@
SHLIB_OBJS = @shlib_objs@
SHLIB_DIR = @multilib_dir@/shlib
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
+# SHLIB_DLLDIR is defined by including one of either t-dlldir or t-dlldir-x
+# (native/cross build respectively) in the tmake_file list in gcc/config.gcc.
+ifndef SHLIB_DLLDIR
+$(error SHLIB_DLLDIR must be defined)
+endif
SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \
if [ ! -d $(SHLIB_DIR) ]; then \
@@ -91,9 +96,10 @@ SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.
SHLIB_INSTALL = \
- $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
+ $$(mkinstalldirs) $$(DESTDIR)$$(SHLIB_DLLDIR) \
+ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
$(INSTALL) $(SHLIB_DIR)/$(SHLIB_SONAME) \
- $$(DESTDIR)$$(bindir)/$(SHLIB_SONAME); \
+ $$(DESTDIR)$$(SHLIB_DLLDIR)/$(SHLIB_SONAME); \
$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \
$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB)
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
Index: gcc/config/i386/t-dlldir
===================================================================
--- gcc/config/i386/t-dlldir (revision 0)
+++ gcc/config/i386/t-dlldir (revision 0)
@@ -0,0 +1,6 @@
+
+# In a native build, target DLLs go in bindir, where they can be executed.
+# Note double quoting to prevent variables from being evaluated until install
+# time; we don't want to expand them during libgcc.mvars generation.
+
+SHLIB_DLLDIR = $$(bindir)
Index: gcc/config/i386/t-dlldir-x
===================================================================
--- gcc/config/i386/t-dlldir-x (revision 0)
+++ gcc/config/i386/t-dlldir-x (revision 0)
@@ -0,0 +1,9 @@
+
+# In a cross build, bindir contains host not target binaries, so target DLLs
+# instead go in toolexeclibdir, alongside other target binaries and static libs.
+# Note double quoting to prevent variables from being evaluated until install
+# time; we don't want to expand them during libgcc.mvars generation, and in
+# any case, $toolexeclibdir is not defined in the gcc/ subdirectory, only in
+# target lib directories.
+
+SHLIB_DLLDIR = $$(toolexeclibdir)
Index: libgcc/configure
===================================================================
--- libgcc/configure (revision 167484)
+++ libgcc/configure (working copy)
@@ -576,10 +576,13 @@ RANLIB
NM
LIPO
AR
+toolexeclibdir
+toolexecdir
target_subdir
host_subdir
build_subdir
build_libsubdir
+target_noncanonical
host_noncanonical
host_os
host_vendor
@@ -2174,6 +2177,8 @@ esac
esac
+
+
# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
# have matching libraries, they should use host libraries: Makefile.tpl
# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
@@ -2204,6 +2209,36 @@ fi
target_subdir=${target_noncanonical}
+# Calculate toolexeclibdir
+# Also toolexecdir, though it's only used in toolexeclibdir
+case ${version_specific_libs} in
+ yes)
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected.
+ toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
+ toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+ ;;
+ no)
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_noncanonical)'
+ toolexeclibdir='$(toolexecdir)/lib'
+ else
+ toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
+ toolexeclibdir='$(libdir)'
+ fi
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+ esac
+ ;;
+esac
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in (revision 167484)
+++ libgcc/Makefile.in (working copy)
@@ -41,6 +41,7 @@ enable_decimal_float = @enable_decimal_float@
fixed_point = @fixed_point@
host_noncanonical = @host_noncanonical@
+target_noncanonical = @target_noncanonical@
# List of extra object files that should be compiled for this target machine.
# The rules for compiling them should be in the t-* file for the machine.
@@ -175,6 +176,9 @@ STRIP_FOR_TARGET = $(STRIP)
libsubdir = $(libdir)/gcc/$(host_noncanonical)/$(version)
# Used to install the shared libgcc.
slibdir = @slibdir@
+# Maybe used for DLLs on Windows targets.
+toolexecdir = @toolexecdir@
+toolexeclibdir = @toolexeclibdir@
export AR_FOR_TARGET
export AR_CREATE_FOR_TARGET
@@ -194,6 +198,8 @@ export STRIP_FOR_TARGET
export RANLIB_FOR_TARGET
export libsubdir
export slibdir
+export toolexecdir
+export toolexeclibdir
version := $(shell $(CC) -dumpversion)
Index: libgcc/configure.ac
===================================================================
--- libgcc/configure.ac (revision 167484)
+++ libgcc/configure.ac (working copy)
@@ -104,8 +104,39 @@ esac
AC_CANONICAL_HOST
ACX_NONCANONICAL_HOST
+ACX_NONCANONICAL_TARGET
GCC_TOPLEV_SUBDIRS
+# Calculate toolexeclibdir
+# Also toolexecdir, though it's only used in toolexeclibdir
+case ${version_specific_libs} in
+ yes)
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected.
+ toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
+ toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+ ;;
+ no)
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_noncanonical)'
+ toolexeclibdir='$(toolexecdir)/lib'
+ else
+ toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
+ toolexeclibdir='$(libdir)'
+ fi
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+ esac
+ ;;
+esac
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
+
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PING] Re: [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
2010-12-24 0:32 [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc Dave Korn
@ 2011-01-21 5:45 ` Dave Korn
2011-01-21 10:05 ` Kai Tietz
2011-01-21 10:35 ` Paolo Bonzini
1 sibling, 1 reply; 6+ messages in thread
From: Dave Korn @ 2011-01-21 5:45 UTC (permalink / raw)
To: GCC Patches
On 23/12/2010 21:57, Dave Korn wrote:
> gcc/ChangeLog:
>
> 2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
>
> PR target/40125
> * config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*): Select suitable
> t-dlldir{,-x} fragment for build and add it to tmake_file.
> (i[34567]86-*-mingw* | x86_64-*-mingw*): Likewise.
> * Makefile.in (libgcc.mvars): Also export SHLIB_DLLDIR to libgcc.
> * config/i386/t-dlldir: New file.
> (SHLIB_DLLDIR): Define.
> * config/i386/t-dlldir-x: New file.
> (SHLIB_DLLDIR): Define.
> * config/i386/t-cygming: Error out if SHLIB_DLLDIR is not set.
> (SHLIB_INSTALL): Use it.
>
> libgcc/ChangeLog:
>
> 2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
>
> PR target/40125
> * configure.ac: Call ACX_NONCANONICAL_TARGET.
> (toolexecdir): Calculate and AC_SUBST.
> (toolexeclibdir): Likewise.
> * Makefile.in (target_noncanonical): Import.
> (toolexecdir): Likewise.
> (toolexeclibdir): Likewise.
> * configure: Regenerate.
Ping? I could presumably approve the target-specific changes myself, but a
build system maintainer needs to approve the changes to toplevel libgcc
configury, I think.
cheers,
DaveK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PING] Re: [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
2011-01-21 5:45 ` [PING] " Dave Korn
@ 2011-01-21 10:05 ` Kai Tietz
0 siblings, 0 replies; 6+ messages in thread
From: Kai Tietz @ 2011-01-21 10:05 UTC (permalink / raw)
To: Dave Korn; +Cc: GCC Patches
2011/1/21 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 23/12/2010 21:57, Dave Korn wrote:
>
>> gcc/ChangeLog:
>>
>> 2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
>>
>> PR target/40125
>> * config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*): Select suitable
>> t-dlldir{,-x} fragment for build and add it to tmake_file.
>> (i[34567]86-*-mingw* | x86_64-*-mingw*): Likewise.
>> * Makefile.in (libgcc.mvars): Also export SHLIB_DLLDIR to libgcc.
>> * config/i386/t-dlldir: New file.
>> (SHLIB_DLLDIR): Define.
>> * config/i386/t-dlldir-x: New file.
>> (SHLIB_DLLDIR): Define.
>> * config/i386/t-cygming: Error out if SHLIB_DLLDIR is not set.
>> (SHLIB_INSTALL): Use it.
>>
>> libgcc/ChangeLog:
>>
>> 2010-12-22 Dave Korn <dave.korn.cygwin@gmail.com>
>>
>> PR target/40125
>> * configure.ac: Call ACX_NONCANONICAL_TARGET.
>> (toolexecdir): Calculate and AC_SUBST.
>> (toolexeclibdir): Likewise.
>> * Makefile.in (target_noncanonical): Import.
>> (toolexecdir): Likewise.
>> (toolexeclibdir): Likewise.
>> * configure: Regenerate.
>
> Ping? I could presumably approve the target-specific changes myself, but a
> build system maintainer needs to approve the changes to toplevel libgcc
> configury, I think.
>
> cheers,
> DaveK
>
>
Hi Dave,
target part is ok.
Cheers,
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
2010-12-24 0:32 [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc Dave Korn
2011-01-21 5:45 ` [PING] " Dave Korn
@ 2011-01-21 10:35 ` Paolo Bonzini
2011-01-26 7:53 ` Dave Korn
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2011-01-21 10:35 UTC (permalink / raw)
To: GCC Patches, Dave Korn
On 12/23/2010 10:57 PM, Dave Korn wrote:
> That's fine for a native compiler, but for a cross-compiler, the DLLs built
> are target libraries, not host ones. It doesn't make sense to install them in
> $prefix/$target/bin, because that contains host binaries. What does make
> plenty of sense however is to install them somewhere under
> $prefix/$target/lib, since that is chock-full of target binaries already,
> libraries in particular, and following some discussion in the PR audit trail
> we decided toolexeclibdir was the right place.
>
> The attached patch implements this by defining a new SHLIB_xxx variable to
> pass in libgcc.mvars that contains the name of the install directory, either
> bindir or toolexeclibdir; this is set by choosing one of two t-makefile frags
> in config.gcc. It also adds the standard stanza for computing toolexeclibdir
> in libgcc's configure, as the definition wasn't yet available there.
The patch is okay, however it is a bit ugly. Would you investigate
moving the shared library definitions to
libgcc/config/t-slibgcc-cygming, where you can simply use
ifeq ($(host), $(target))
SHLIB_DLLDIR = $(bindir)
else
SHLIB_DLLDIR = $(toolexeclibdir)
fi
instead of the multiple fragments?
See t-slibgcc-darwin for an example.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
2011-01-21 10:35 ` Paolo Bonzini
@ 2011-01-26 7:53 ` Dave Korn
2011-01-26 14:43 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Dave Korn @ 2011-01-26 7:53 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: GCC Patches, Dave Korn
On 21/01/2011 10:04, Paolo Bonzini wrote:
> On 12/23/2010 10:57 PM, Dave Korn wrote:
>> That's fine for a native compiler, but for a cross-compiler, the DLLs
>> built are target libraries, not host ones. It doesn't make sense to
>> install them in $prefix/$target/bin, because that contains host binaries.
>> What does make plenty of sense however is to install them somewhere under
>> $prefix/$target/lib, since that is chock-full of target binaries
>> already, libraries in particular, and following some discussion in the PR
>> audit trail we decided toolexeclibdir was the right place.
>>
>> The attached patch implements this by defining a new SHLIB_xxx variable
>> to pass in libgcc.mvars that contains the name of the install directory,
>> either bindir or toolexeclibdir; this is set by choosing one of two
>> t-makefile frags in config.gcc. It also adds the standard stanza for
>> computing toolexeclibdir in libgcc's configure, as the definition wasn't
>> yet available there.
>
> The patch is okay, however it is a bit ugly.
Given time pressure, committed as it stands at r.169274.
> Would you investigate moving the shared library definitions to
> libgcc/config/t-slibgcc-cygming, where you can simply use
>
> ifeq ($(host), $(target))
> SHLIB_DLLDIR = $(bindir)
> else
> SHLIB_DLLDIR = $(toolexeclibdir)
> fi
>
> instead of the multiple fragments?
Isn't libgcc like other target libs in that host always == target when it's
being built? It appears that way to me. I think I'd have to import
with_cross_host into the makefile to be able to use it in a makefile frag
there, which is why I went for the choose-a-frag-in-gcc-configure approach in
the first place...
cheers,
DaveK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc
2011-01-26 7:53 ` Dave Korn
@ 2011-01-26 14:43 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2011-01-26 14:43 UTC (permalink / raw)
To: Dave Korn; +Cc: GCC Patches, Dave Korn
On 01/26/2011 05:49 AM, Dave Korn wrote:
>> The patch is okay, however it is a bit ugly.
>
> Given time pressure, committed as it stands at r.169274.
No problem.
>> Would you investigate moving the shared library definitions to
>> libgcc/config/t-slibgcc-cygming, where you can simply use
>>
>> ifeq ($(host), $(target))
>> SHLIB_DLLDIR = $(bindir)
>> else
>> SHLIB_DLLDIR = $(toolexeclibdir)
>> fi
>>
>> instead of the multiple fragments?
>
> Isn't libgcc like other target libs in that host always == target when it's
> being built?
Yes, I meant ifeq ($(host), $(with_cross_host)).
> It appears that way to me. I think I'd have to import
> with_cross_host into the makefile to be able to use it in a makefile frag
> there.
That's just an AC_SUBST away.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-26 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-24 0:32 [PATCH,cygming,buildsys] Fix remaining parts of PR40125: [1/2] libgcc Dave Korn
2011-01-21 5:45 ` [PING] " Dave Korn
2011-01-21 10:05 ` Kai Tietz
2011-01-21 10:35 ` Paolo Bonzini
2011-01-26 7:53 ` Dave Korn
2011-01-26 14:43 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).