a. He told me things in order to cheer me up.
It seems to me that native speakers find that sentence correct. I have a problem with it. Not all 'things' make cheer me up. Only some do. You have to define 'things'. That sentence does not define 'things'.
b. He gave me books to cheer me up.
I think that sentence is ambiguous. It could mean
c. He gave me books that would cheer me up. (particular books that had the ability to cheer me up)
d. He gave me books in order to cheer me up.
He knew I liked books, so he gave me books.
That sentence is a bit like:
e. He gave me money (in order) to make me happy.
In (d) he might have given me tragedies, for all we know. The books need not be cheerful. They might even make me cry.The fact that he presented me with books would cheer me up.
If we apply that logic to (a), we'll see that it shouldn't work. Yet it does!
Basically, if I am correct, the same logic does not apply to 'things' and to 'books'.
Maybe 'things' (and also 'something') are exceptions. Or maybe I am completely missing something.
Maybe (d) is ambiguous. Maybe it might have two meanings
He gave me books that would cheer me up,
He gave me books because he knew I liked books.