Merge 2.0.0 modification to prepare v1.2.2 release.
Merge pull request #303 from BernardXiong/stable-v1.2.x

Merge 2.0.0 modification to prepare v1.2.2 release.
[BSP] fix UART3 issue in STM32F40x.
[bsp] Fix serial 3 issue in beaglebone.
[libcpu] fix spell wrong.
[building] fix command too long issue under win32.
[Kernel] fix spell wrong in comments.
[pthreads] fix pthread_cond_init issue when attr is NULL.
[newlib] Remove compiling warning.
[DFS] fix copy command issue.
Merge pull request #309 from BernardXiong/stable-v1.2.x

prepare RT-Thread 1.2.2 release
Update rtconfig.h
kernel: mempool: fix race condition in rt_mp_alloc

When thread wake up from waiting for memory, there is a chance that
there is no memory available in high pressure. So use a loop to check
again. Otherwise, there will be a NULL reference.

Commit b8bf6bef76bdabe76749c752217afbe5d24ba371 from master.
Merge pull request #317 from grissiom/fix-mempool-st

[stable] kernel: mempool: fix race condition in rt_mp_alloc
tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBS

The order of them are important while the uniqueness has nothing to do
with the compiling.

commit 2c5eea4c21ea66f711974ab6ce1048337f7b9efc in upstream.
Merge pull request #350 from grissiom/fix-tools-stable

tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBS
tools: fix SrcRemove on empty src

If the src is empty list, it will crash at:

    IndexError: list index out of range:
      File "/home/xxx/src/SConstruct", line 39:
        objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=True)
      ...
      File "/home/xxx/src/drivers/SConscript", line 12:
        SrcRemove(src, src_need_remove)
      File "/home/rt-thread-stable/tools/building.py", line 496:
        if type(src[0]) == type('str'):

Commit d33df46f1921f241199e7520e384e851840571ef in master.
Merge pull request #352 from grissiom/fix-tools-srcremove-st

tools: fix SrcRemove on empty src
Prepare RT-Thread 1.2.3 release.
[LIBC] fix the open mode when using fopen in arm libc.